Skip to content

Elevenlabs use previous_text to improve generation #1399

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

Closed
danthegoodman1 opened this issue Mar 19, 2025 · 1 comment
Closed

Elevenlabs use previous_text to improve generation #1399

danthegoodman1 opened this issue Mar 19, 2025 · 1 comment

Comments

@danthegoodman1
Copy link
Contributor

Pipecat chops up LLM generations send to TTS by punctuation to reduce latency. This creates problems when it feeds TTS a short utterance like Ok., which often causes it to SCREAM randomly, and at best, have a completely different tonality. Short TTS messages give highly variable results, and destroy immersion.

If the TTS was optionally able to access the context, then it could take the most recent message(s) it had generated and populate that in the previous_text parameter to enable far smoother TTS generations.

@markbackman
Copy link
Contributor

markbackman commented Apr 16, 2025

I haven't had the TTS respond with a scream, but I have noticed that single words are over-emphasized. I think this is an issue with the model itself and is something the 11Labs team should improve.

If the first word of a response is short, then there is no contextual information to provide before it as part of previous_text. If you provide other information from the context, that's just a hack to override the over-emphasized response. I don't think that's a good general solution for Pipecat though.

I'm implementing previous_text as recommended by the 11Labs team: #1600.

I've also asked the 11Labs team for tips on how to make single word inputs fit the sentence context.

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