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.
786 B
786 B
- Fixed
InworldRealtimeLLMServicenot supporting manual-mode turn detection (session_properties.audio.input.turn_detection=None). Previously_handle_user_stopped_speakingand_handle_interruptionassumed 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 explicitInputAudioBufferCommitEvent+ResponseCreateEventon user-stopped-speaking andInputAudioBufferClearEvent+ResponseCancelEventon interruption, gated on a new_is_manual_turn_detection()check (mirroring the pattern inOpenAIRealtimeLLMService).