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

ElevenLabs exception: sent 1009 (message too big) #983

Open
markbackman opened this issue Jan 14, 2025 · 2 comments
Open

ElevenLabs exception: sent 1009 (message too big) #983

markbackman opened this issue Jan 14, 2025 · 2 comments
Assignees

Comments

@markbackman
Copy link
Contributor

Description

This is a bug. Sometimes, the text sent to the ElevenLabsTTSService is too long, resulting in a WebSocket error code 1009 (message too big).

Environment

  • pipecat-ai version: 0.0.52
  • python version: any
  • OS: any

Issue description

Example Discord thread where this is reported.

Repro steps

Looking for help with a concise repro condition.

Expected behavior

Messages are always accepted by ElevenLabs.

Actual behavior

Occasionally, messages are too big.

Logs

See Discord thread for an example case.

@markbackman
Copy link
Contributor Author

This issue isn't understood that well, but it appears that the websocket state may be not healthy at the time this error occurs. We can track the root cause to the _receive_task_handler. We've refactor that code to resolve a separate issue in the PR #962.

For now, we'll include this change in the upcoming release and will observe if that resolves the issue. After 0.0.53 is released, please let us know if you still encounter the 1009 websocket error.

@markbackman
Copy link
Contributor Author

markbackman commented Jan 22, 2025

I've finally been able to repro this issue using the Turbo v2.5 model by pushing a TTSSpeakFrame with the following text:

"\n- Thursday, January twenty-third, 2025, at eleven-thirty A-M\n- Monday, January twenty-seventh, 2024, at twelve-thirty P-M\n- Wednesday, January twenty-ninth, 2025, at five P-M\nDo any of these times work for you?"

Note, this issue doesn't happen with the given text using the Flash v2.5 model.

What's odd is that the length isn't the root cause. There's something about the character combination that's causing this issue. I've reached out to ElevenLabs for help understanding what can and can't be passed to their API.

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

2 participants