prevent last comment being cut offin the middle

This commit is contained in:
Simon Woker authored and GitHub committed 2022-07-20 12:57:52 +02:00
1 parent 222b7d6e68
commit b0fa661624
1 file changed
+1 -2
+1 -2
View File
@@ -127,8 +127,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: