Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add replace for % sign #1248

Closed
cboxgo69 opened this issue Sep 10, 2022 · 4 comments
Closed

[Feature]: Add replace for % sign #1248

cboxgo69 opened this issue Sep 10, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@cboxgo69
Copy link

Summary

Add replace for % sign

Is your feature request related to a problem?

When translating reddit entries with the % sign, the character is removed.

Describe the solution you'd like

Please add something like this to voice.py:

    # remove any urls from the text
    regex_urls = r"((http|https)\:\/\/)?[a-zA-Z0-9\.\/\?\:@\-_=#]+\.([a-zA-Z]){2,6}([a-zA-Z0-9\.\&\/\?\:@\-_=#])*"

    result = re.sub(regex_urls, " ", text)
    result = result.replace("%", " percent ")

this will result in the % being read out by the TTS.

Describe alternatives you've considered

No response

Additional Context

No response

@cboxgo69 cboxgo69 added the enhancement New feature or request label Sep 10, 2022
@OpenSourceSimon
Copy link
Collaborator

Thanks for submitting a feature request! On what TTS does this happen?

@cboxgo69
Copy link
Author

cboxgo69 commented Sep 19, 2022

I used that on the Streamlabs TTS because it takes something like: "47% of people" and reads it out as "47 of people". by changing "%" to the word "percent" it will actually read out the word "percent"

I would think this applies to all of the TTS engines...

@OpenSourceSimon
Copy link
Collaborator

I used that on the Streamlabs TTS because it takes something like: "47% of people" and reads it out as "47 of people". by changing "%" to the word "percent" it will actually read out the word "percent"

I would think this applies to all of the TTS engines...

Thanks for your quick reply! I think this needs to be in the TTS/engine_wrapper.py. I will take a look at it later

@JasonLovesDoggo
Copy link
Collaborator

See #1254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants