fixed creating lots of tts & screenshots

pull/963/head
Drugsosos 2 years ago
parent 77dfedef31
commit 048369bcf6
No known key found for this signature in database
GPG Key ID: 8E35176FE617E28D

@ -63,6 +63,8 @@ class TTSEngine:
sync_tasks_primary = [
self.call_tts(str(idx), comment['comment_body'])
for idx, comment in track(enumerate(self.reddit_object['comments']), description='Saving...')
# Crunch, there will be fix in async TTS api
if self.__total_length + self.__total_length * 0.05 < self.max_length
]
print_substep('Saved Text to MP3 files successfully.', style='bold green')
@ -109,7 +111,6 @@ class TTSEngine:
)
clip_length = audio_length(f'assets/temp/mp3/{filename}.mp3')
print(clip_length, '/', self.__total_length) # TODO remove debug
if clip_length and self.__total_length + clip_length <= self.max_length:
self.__total_length += clip_length

Loading…
Cancel
Save