nice-room-70150
10/01/2025, 9:39 PMtall-airline-16756
10/01/2025, 9:39 PMtall-airline-16756
10/01/2025, 9:39 PMrun_ctx.speech_handle.interrupted to spot interruptions. If an interruption happens, let the task keep going quietly in the background instead of stopping it.
• When you use session.say(), try setting allow_interruptions=False to help minimize interruptions.
• For those important tasks, consider running them as independent background jobs with asyncio.create_task(). This way, they won’t get tangled up with the conversation flow.
• If you want, you can use RPC or custom events to gently let the WebSDK client know when the task is done.
Just a quick note: the WebSDK itself doesn’t manage task execution or handle interruptions. If any of this feels unclear or you’d like some examples, please don’t hesitate to ask—I’m here to support you!
Sources: Turn detection and interruptions | LiveKit Docs | Docs::Agents | docs/index.yaml | Docs::Agents | livekit-agents/livekit/agents/voice/agent_activity.py