Merge pull request #4527 from pipecat-ai/mb/fix-elevenlabs-keepalive-1008

Fix ElevenLabs keepalive racing context-init (1008 disconnects)
This commit is contained in:
Mark Backman
2026-05-20 11:21:17 -04:00
committed by GitHub
3 changed files with 124 additions and 16 deletions

1
changelog/4527.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed a race in `ElevenLabsTTSService` where the periodic keepalive could be sent for a new turn's context before that context's `voice_settings` initialization message, causing ElevenLabs to close the WebSocket with a 1008 policy violation (`voice_settings field must be provided in the first message ...`). The keepalive now only targets a context once its context-init has been sent.