added backup contingency

pull/880/head
Jason 2 years ago
parent aeafb53da3
commit 2b0d66f451

@ -114,9 +114,12 @@ class TTSEngine:
# self.length += MP3(f"{self.path}/{filename}.mp3").info.length
# except (MutagenError, HeaderNotFoundError):
# self.length += sox.file_info.duration(f"{self.path}/{filename}.mp3")
clip = AudioFileClip(f"{self.path}/{filename}.mp3")
self.length += clip.duration
clip.close()
try:
clip = AudioFileClip(f"{self.path}/{filename}.mp3")
self.length += clip.duration
clip.close()
except:
self.length = 0
def process_text(text: str):

Loading…
Cancel
Save