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.
417 B
417 B
- Added
examples/realtime/realtime-inworld-local-vad.py, a variant of the base Inworld Realtime example that disables Inworld's server-side turn detection (turn_detection=None, manual mode) and instead drives turn boundaries locally withSileroVADAnalyzerwired into the user aggregator. Mirrors the OpenAI Realtime and Grok Realtime local-VAD variants. Server-emitted turn frames are preferred when available.