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

[FR][TTS][Android]Fibo split #1222

Open
mablue opened this issue Aug 5, 2024 · 7 comments
Open

[FR][TTS][Android]Fibo split #1222

mablue opened this issue Aug 5, 2024 · 7 comments

Comments

@mablue
Copy link
Contributor

mablue commented Aug 5, 2024

The Main problem is that for blinds while using screen readers we have much latency cuz of sherpa models processing algorithm.
How we can fix this problem?
We used punctuation marks to split texts to small parts to process fast in costume screenreaders.
But some times in a social media or anywhere we have many long messages that the users not used any punctuation marks inside them

Please append a punctuation marks fild and fibo split checkmark to make processing faster.
That a logarithmic algo like Fibonacci will use spliting and sending things to models that it makes engine faster to start speaking.
images (27)

  1. Split First word and send to model and speak it than
  2. split second and speak it
  3. split two later words and speak them
  4. split three later words and speak them
  5. split 5 later words and speak them
    ...
@mablue mablue changed the title Fibo split [FR][TTS][Android]Fibo split Aug 5, 2024
@csukuangfj
Copy link
Collaborator

Would you like to contribute?

An alternative is to split a sentence into smaller ones if the number of tokens is greater than some threshold, say, 10.

@mablue
Copy link
Contributor Author

mablue commented Aug 6, 2024

Yes I want,where should start?
Yes your porpuse is fast and simple.
I will work on it.

@csukuangfj
Copy link
Collaborator

Please see

std::vector<TokenIDs> token_ids =
frontend_->ConvertTextToTokenIds(text, meta_data.voice);

If token_ids[i].tokens.size() is larger than a threshold, then you need to split token_ids[i].tokens into smaller pieces so that each piece's length is smaller than the given threshold.

The basic knowledge is knowing how to split a std::vector<int32_t> into smaller vectors.

@GeminiT369
Copy link

I think this should be carefully considered. When the VITS model synthesizes sounds, the pronunciation of a word is related to its context. Improper segmentation may lead to low synthesis effects.

@mablue
Copy link
Contributor Author

mablue commented Aug 12, 2024

Please see

std::vector<TokenIDs> token_ids =
frontend_->ConvertTextToTokenIds(text, meta_data.voice);

If token_ids[i].tokens.size() is larger than a threshold, then you need to split token_ids[i].tokens into smaller pieces so that each piece's length is smaller than the given threshold.

The basic knowledge is knowing how to split a std::vector<int32_t> into smaller vectors.

Ops cpp ?!! :D
Owkey I will get a try

@GeminiT369 it is very important for someone who uses screen readers.
It will be optional that you use or not use this thing also in languages like persian we want to just have a alternative to e-speak and it doesn't matter if it have very small synthesis effects.
But for for someone with visually problem it's important to have a fast tts.
I think maybe if we can reduce models to 2mb it will fix all problems...but we cant do it.
Or I dont know? Maybe we can?

@csukuangfj
Copy link
Collaborator

By the way, we can limit the changes only to Persian.

@danpovey
Copy link
Collaborator

danpovey commented Aug 15, 2024 via email

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

No branches or pull requests

4 participants