Merge pull request #1049 from swoker/patch-3

prevent last comment being cut off in the middle
pull/1120/head
Jason 2 years ago committed by GitHub
commit d1009ef098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -120,8 +120,7 @@ class TTSEngine:
# self.length += sox.file_info.duration(f"{self.path}/{filename}.mp3") # self.length += sox.file_info.duration(f"{self.path}/{filename}.mp3")
try: try:
clip = AudioFileClip(f"{self.path}/{filename}.mp3") clip = AudioFileClip(f"{self.path}/{filename}.mp3")
if clip.duration + self.length < self.max_length: self.last_clip_length = clip.duration
self.last_clip_length = clip.duration
self.length += clip.duration self.length += clip.duration
clip.close() clip.close()
except: except:

Loading…
Cancel
Save