Merge pull request #4497 from pipecat-ai/aleix/fix-tts-context-id-fallback

Fall back to _turn_context_id in get_active_audio_context_id
This commit is contained in:
Aleix Conchillo Flaqué
2026-05-14 13:34:34 -07:00
committed by GitHub
3 changed files with 11 additions and 3 deletions

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

@@ -0,0 +1 @@
- Fixed dropped audio in streaming TTS services whose wire protocol doesn't echo `context_id` back on incoming audio (Sarvam, Smallest, Soniox, Inworld, and others). Previously, audio that arrived between contexts or at the very start of a turn was tagged with `context_id=None` and silently dropped with an "unable to append audio to context: no context ID provided" debug log. `TTSService.get_active_audio_context_id()` now falls back to the synthesis-side `_turn_context_id` when the playback cursor isn't set yet.