diff --git a/TTS/engine_wrapper.py b/TTS/engine_wrapper.py index 625ffd8..ff6c9ed 100644 --- a/TTS/engine_wrapper.py +++ b/TTS/engine_wrapper.py @@ -83,8 +83,11 @@ class TTSEngine: def split_post(self, text: str, idx: int): split_text = [ x.group().strip() - for x in re.finditer(rf" *((.{{0,{self.tts_module.max_chars}}})(\.|.$))", text) + for x in re.finditer(rf"*(((.| \n){self.tts_module.max_chars})(\.|.$))", text) ] + + + try: silence_duration = settings.config["settings"]["tts"]["silence_duration"] except ValueError: diff --git a/reddit/subreddit.py b/reddit/subreddit.py index fc4952c..31fa6ed 100644 --- a/reddit/subreddit.py +++ b/reddit/subreddit.py @@ -106,6 +106,7 @@ def get_subreddit_threads(POST_ID: str): continue if top_level_comment.body in ["[removed]", "[deleted]"]: continue # # see https://github.com/JasonLovesDoggo/RedditVideoMakerBot/issues/78 + #print(top_level_comment.body) #print(sanitize_text(top_level_comment.body)) if not sanitize_text(top_level_comment.body)or sanitize_text(top_level_comment.body).isspace(): print("fuck you") diff --git a/video_creation/data/videos.json b/video_creation/data/videos.json index 8d7c07e..75f44cc 100644 --- a/video_creation/data/videos.json +++ b/video_creation/data/videos.json @@ -78,5 +78,13 @@ "background_credit": "bbswitzer", "reddit_title": "What if Earth is like one of those uncontacted tribes in South America like the whole Galaxy knows were here but theyve agreed not to contact us until we figure it out for ourselves", "filename": "What if Earth is like one of those uncontacted tribes in South America like the whole Galaxy knows were here but theyve agreed not to contac.mp4" + }, + { + "subreddit": "askreddit", + "id": "vw4pl6", + "time": "1657563838", + "background_credit": "bbswitzer", + "reddit_title": "What are some of the first signs a movie is going to suck", + "filename": "What are some of the first signs a movie is going to suck.mp4" } ] \ No newline at end of file