-
Notifications
You must be signed in to change notification settings - Fork 60
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
Catch max tokens before exceeding it #193
Comments
Hey, this seems to be very interesting |
I pushed up a branch that has this code in it. Seems to work fine in initial testing for me, but I only saw this error very rarely. If anyone has text that reliably triggers this, please give it a try and report back. In implementing this I realize I'm breaking things up into sentences multiple times. Once I'm satisfied this works well, I'll try to go back and clean things up so it really just goes from chapters, to token-length sentence chunks, to tts. |
I don't think this is working, or maybe it's the way I've implemented it? Seems to be conflating some things though. The specific error I thought this would address is the "character limit of XX for lanage", and ELSEWHERE I've seen errors of something like exceeding 400 tokens. I think these are two separate limitations. What this code does is take a sentence and use yet another tokenizer to break it into a sentence, then count the words in that sentence:
The ideal solution would:
|
Hello. Are you talking about this? I've found the reference in there coqui-ai/TTS#3197 They are saying they change the limit to 2500 and it is working (sometimes)!?! |
try any book, it happens 50 times per book |
Since switching to sending only one sentence at a time to TTS I have not been able to reproduce this. Closing now, but if you can reproduce reliably please include sample that triggers this. |
Sometimes a sentence is too long and Coqui sends a warning saying text exceeds max tokens and may result in truncated speech. On Discord, this user shared code that uses the tokenizer to count the tokens. It would be good to take this and either implement as-is, or use parts of this to more intelligently break up sentences before sending them to TTS.
The text was updated successfully, but these errors were encountered: