RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

voice.py regex fixes

Open AnthonyLloydDotNet opened this issue 3 years ago • 2 comments

Describe the bug 1 the tts cannot read em dash symbols (—) 2 the tts cannot read blank lines produced by the url regex. if the string(result) = " " and is sent to the TTS, it creates a bugged x-x.part.mp3 that cannot be read

To Reproduce read a comment including the em dash symbol (—) read a comment including a url which the engine_wrapper.py calls call_tts (which calls process text etc. etc.) where text=process_text(text) == a url by itself, this is regexed into " ", which cannot be read by the TTS and produces a bugged mp3

Expected behavior the program should make .part.mp3s that are readable

Screenshots

System (please complete the following information):

Windows 10 develop

Additional context

implement these changes

regex_expr = r"\s['|’]|['|’]\s|[\^_~@!&;#:\-%—“”‘\"%\*/{}\[\]\(\)\\|<>=+]"

result = re.sub(regex_urls, "url", text)

AnthonyLloydDotNet avatar Jul 11 '22 06:07 AnthonyLloydDotNet

hi, we are open to improvement regarding this issue. I will tag this as a good first issue for other who want to contribute.

William9923 avatar Jul 11 '22 09:07 William9923

hi, we are open to improvement regarding this issue. I will tag this as a good first issue for other who want to contribute.

issues fixed in this change made to my version of the develop branch

https://github.com/tonywiththetommy/RedditVideoMakerBot_mainfork/blob/develop/utils/voice.py

AnthonyLloydDotNet avatar Jul 11 '22 10:07 AnthonyLloydDotNet