fix: fixed audio error

fix: mp3 error
fixes #76
fixes #71
pull/418/head
Jason 2 years ago
parent 6729cba965
commit 0c1ccebb12

@ -13,6 +13,7 @@ from requests.adapters import HTTPAdapter, Retry
# pf = ProfanityFilter()
# Code by @JasonLovesDoggo
# https://twitter.com/scanlime/status/1512598559769702406
nonhuman = [ # DISNEY VOICES
"en_us_ghostface", # Ghost Face
"en_us_chewbacca", # Chewbacca
@ -86,12 +87,12 @@ class TTTTSWrapper: # TikTok Text-to-Speech Wrapper
)
chunks = [
m.group().strip() for m in re.finditer(r" *((.{0,200})(\.|.$))", req_text)
m.group().strip() for m in re.finditer(r" *((.{0,299})(\.|.$))", req_text)
]
audio_clips = []
cbn = sox.Combiner()
cbn.set_input_format(file_type=["mp3"])
cbn.set_input_format(file_type=["mp3" for _ in chunks])
chunkId = 0
for chunk in chunks:

Loading…
Cancel
Save