Inworld Realtime's session properties accept turn_detection=None to put the service into manual mode (matching OpenAI Realtime's turn_detection=False), but the Pipecat integration hardcoded _handle_user_stopped_speaking and _handle_interruption to assume server-side VAD: both were no-ops on the client side because Inworld's server normally handles commit/cancel/response.create automatically. In manual mode the server doesn't, so local-VAD-driven turns stalled — the bot never responded after the user stopped speaking, and interruptions left the in-flight response running. Mirror the OpenAI Realtime pattern: on user-stopped-speaking in manual mode, send InputAudioBufferCommitEvent + ResponseCreateEvent; on interruption in manual mode, send InputAudioBufferClearEvent + ResponseCancelEvent. Gate both on a new _is_manual_turn_detection() helper. Add examples/realtime/realtime-inworld-local-vad.py, the matching *-local-vad.py variant for parity with the OpenAI Realtime and Grok Realtime variants, and point the Inworld service docstring at it.
2 lines
786 B
Markdown
2 lines
786 B
Markdown
- Fixed `InworldRealtimeLLMService` not supporting manual-mode turn detection (`session_properties.audio.input.turn_detection=None`). Previously `_handle_user_stopped_speaking` and `_handle_interruption` assumed Inworld's server-side VAD handled commit/cancel/response.create automatically and were no-ops on the client side. In manual mode the server doesn't, so local-VAD-driven turns stalled: the bot never responded after the user stopped speaking, and interruptions didn't cancel the in-flight response. Wire the explicit `InputAudioBufferCommitEvent` + `ResponseCreateEvent` on user-stopped-speaking and `InputAudioBufferClearEvent` + `ResponseCancelEvent` on interruption, gated on a new `_is_manual_turn_detection()` check (mirroring the pattern in `OpenAIRealtimeLLMService`).
|