diff --git a/TTS/engine_wrapper.py b/TTS/engine_wrapper.py index d6c3625..d80b0a7 100644 --- a/TTS/engine_wrapper.py +++ b/TTS/engine_wrapper.py @@ -9,7 +9,7 @@ from rich.progress import track from moviepy.editor import AudioFileClip, CompositeAudioClip, concatenate_audioclips from utils.console import print_step, print_substep from utils.voice import sanitize_text - +DEFUALT_MAX_LENGTH: int = 50 class TTSEngine: @@ -30,7 +30,7 @@ class TTSEngine: tts_module, reddit_object: dict, path: str = "assets/temp/mp3", - max_length: int = 50, + max_length: int = DEFUALT_MAX_LENGTH, ): self.tts_module = tts_module() self.reddit_object = reddit_object diff --git a/video_creation/voices.py b/video_creation/voices.py index cbe27f5..d6f3d89 100644 --- a/video_creation/voices.py +++ b/video_creation/voices.py @@ -22,11 +22,8 @@ TTSProviders = { "TikTok": TikTok, } -VIDEO_LENGTH: int = 40 # secs - - def save_text_to_mp3(reddit_obj: dict[str]) -> tuple[int, int]: - """Saves text to MP3 files. Goes through the reddit_obj and generates the title MP3 file and a certain number of comments until the total amount of time exceeds VIDEO_LENGTH seconds. + """Saves text to MP3 files. Args: reddit_obj (dict[str]): Reddit object received from reddit API in reddit/subreddit.py @@ -41,7 +38,6 @@ def save_text_to_mp3(reddit_obj: dict[str]) -> tuple[int, int]: get_case_insensitive_key_value(TTSProviders, env), reddit_obj ) else: - choice = "" while True: print_step("Please choose one of the following TTS providers: ") print_table(TTSProviders)