From b0fa6616248ac9df93b533c3e50f127f328ec29b Mon Sep 17 00:00:00 2001 From: Simon Woker Date: Wed, 20 Jul 2022 12:57:52 +0200 Subject: [PATCH] prevent last comment being cut offin the middle --- TTS/engine_wrapper.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TTS/engine_wrapper.py b/TTS/engine_wrapper.py index 267f47a..65c1453 100644 --- a/TTS/engine_wrapper.py +++ b/TTS/engine_wrapper.py @@ -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: