diff --git a/video_creation/voices.py b/video_creation/voices.py index e8d8e43..43fb7fc 100644 --- a/video_creation/voices.py +++ b/video_creation/voices.py @@ -20,6 +20,10 @@ def save_text_to_mp3(reddit_obj): tts = gTTS(text=reddit_obj["thread_title"], lang="en", slow=False) tts.save(f"assets/mp3/title.mp3") length += MP3(f"assets/mp3/title.mp3").info.length + tts = gTTS(text=reddit_obj["thread_selftext"], lang="en", slow=False) + tts.save(f"assets/mp3/selftext.mp3") + length += MP3(f"assets/mp3/selftext.mp3").info.length + for idx, comment in track(enumerate(reddit_obj["comments"]), "Saving..."): # ! Stop creating mp3 files if the length is greater than 50 seconds. This can be longer, but this is just a good starting point