thanks callum this fixes issue good
pull/915/head
anthony lloyd 3 years ago
parent a533c6c0d6
commit 75715754f7

@ -83,8 +83,11 @@ class TTSEngine:
def split_post(self, text: str, idx: int): def split_post(self, text: str, idx: int):
split_text = [ split_text = [
x.group().strip() 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: try:
silence_duration = settings.config["settings"]["tts"]["silence_duration"] silence_duration = settings.config["settings"]["tts"]["silence_duration"]
except ValueError: except ValueError:

@ -106,6 +106,7 @@ def get_subreddit_threads(POST_ID: str):
continue continue
if top_level_comment.body in ["[removed]", "[deleted]"]: if top_level_comment.body in ["[removed]", "[deleted]"]:
continue # # see https://github.com/JasonLovesDoggo/RedditVideoMakerBot/issues/78 continue # # see https://github.com/JasonLovesDoggo/RedditVideoMakerBot/issues/78
#print(top_level_comment.body)
#print(sanitize_text(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(): if not sanitize_text(top_level_comment.body)or sanitize_text(top_level_comment.body).isspace():
print("fuck you") print("fuck you")

@ -78,5 +78,13 @@
"background_credit": "bbswitzer", "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", "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" "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"
} }
] ]
Loading…
Cancel
Save