Merge pull request #1049 from swoker/patch-3

prevent last comment being cut off in the middle
This commit is contained in:
Jason authored and GitHub committed 2022-08-02 11:28:33 -04:00
commit d1009ef098
1 file changed
+1 -2
+1 -2
View File
@@ -120,8 +120,7 @@ class TTSEngine:
# self.length += sox.file_info.duration(f"{self.path}/{filename}.mp3")
try:
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
clip.close()
except: