salmon-belgium-62133
12/04/2025, 7:41 AMtall-airline-16756
12/04/2025, 7:41 AMtall-airline-16756
12/04/2025, 7:42 AMawait session.say("Hello, I cannot be interrupted.", allow_interruptions=False)
• TypeScript:
await session.say('Hello, I cannot be interrupted.', { allowInterruptions: false });
To disable interruptions for an entire session:
• Python:
session = AgentSession(
# ...other settings
allow_interruptions=False
)
• TypeScript:
const session = new voice.AgentSession({
// ...other settings
voiceOptions: { allowInterruptions: false }
});
Notes:
• Real-time models with built-in turn detection may ignore allow_interruptions.
• You can still force an interrupt programmatically using session.interrupt() or handle.interrupt().
• Interruption behavior also respects min_interruption_duration (default 0.5s) and min_interruption_words (default 0).
Do you want the Python or TypeScript example adapted to your existing code or the session-level setting applied globally?
Sources: Turn detection and interruptions | LiveKit Docs | examples/voice_agents | livekit/livekit_composite | DeepWikisalmon-belgium-62133
12/04/2025, 7:45 AMtall-airline-16756
12/04/2025, 7:46 AMallow_interruptions.
If you’d like, tell me which SDK/method you’re using (say(), generate_reply(), or session-level settings and Python vs TypeScript) and I’ll show the exact code example to toggle allow_early_termination.salmon-belgium-62133
12/04/2025, 8:11 AMtall-airline-16756
12/04/2025, 8:11 AMallow_interruptions is typically ignored — real-time models use built‑in turn detection and handle their own turn‑taking, so the flag won’t reliably block or allow user interrupts.
Use allow_interruptions for non–real-time agents to control user-initiated interrupts. For real-time models, rely on the model's turn-detection behavior or use programmatic interrupts (session.interrupt() / handle.interrupt()) if you need explicit control.