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

TTS: Strange sounding stops #4

Open
EceSenaEtoglu opened this issue Oct 7, 2023 · 0 comments
Open

TTS: Strange sounding stops #4

EceSenaEtoglu opened this issue Oct 7, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@EceSenaEtoglu
Copy link
Owner

EceSenaEtoglu commented Oct 7, 2023

This issue is not a priority until changing the API

If there seems to be no " . " (followed by space) token in a sentence that is more than 100 character long, TTS API introduces stops. I add ". " when concatenating every text block, to eliminate the chances of unwanted stops.**

But I can't have control over the text sent by the API: I.e if the article description is 100 chars long without a ". "
Sometimes there is a stop at the middle of a sentence due to this. For example:
"bla bla X has been interviewing Z bla bla" there might be a stop after "been" and it sounds strange...**

See the similar issue in API library pndurette/gTTS#119 also https://gtts.readthedocs.io/en/latest/tokenizer.html#tokenizing for excepted tokens.

Solutions I can think of are:

1- iterate through the text and if there does not exist ", ." in a group of 100 chars; adding ". , " near to keywords "and, or" (if they exist)
But this increases the complexity since for every article we have to go through it's text and such keywords might not exit...

2-trim article text to be less than 100 chars long, this would help with strange stops but will reduce article data.

I'd want to hear other solutions.

Details for the curious: (The Google TTS API actually introduces stops in every 100 chars but gTTS library avoids this behaviour if there exist ". , " in the sentence. But if there are not any ". ," nothing can be done by the gTTS to eliminate stops")

@EceSenaEtoglu EceSenaEtoglu added help wanted Extra attention is needed enhancement New feature or request labels Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant