helpful-church-33114
12/22/2025, 7:23 AMtall-airline-16756
12/22/2025, 7:23 AMtall-airline-16756
12/22/2025, 7:23 AMsession.interrupt() eventually calling SpeechHandle.interrupt() which raises: "This generation handle does not allow interruptions".
• That means the current speech/reply was started with allow_interruptions=False, so normal interrupts are blocked.
How to fix
• If you want to force an interrupt, call:
session.interrupt(force=True)
• If you control how the speech is created and want it interruptible, set:
await session.say("...", allow_interruptions=True)
# or
session.generate_reply(..., allow_interruptions=True)
Quick safety tip
• Wrap interrupts in try/except or use force=True when user input or other events must reliably stop playback:
try:
session.interrupt(force=True)
except Exception as e:
logger.warning(f"Interrupt failed: {e}")
If you'd like, share the snippet where you call say() / generate_reply() and where you call session.interrupt() and I can point out the exact change.
Sources: Turns overview | LiveKit docs | Agent speech and audio | LiveKit docshelpful-church-33114
12/22/2025, 7:25 AMtall-airline-16756
12/22/2025, 7:26 AMpreemptive_generation=True, MultilingualModel() for turn detection, and a custom VAD. That helps.
Brief diagnosis
• The RuntimeError you saw means an active speech/generation was marked uninterruptible (started with allow_interruptions=False) and then session.interrupt() was called.
• With your config, two likely causes are:
◦ A speech handle was created as uninterruptible (explicitly or by default in some code path).
◦ A race between preemptive generation and your interrupt logic causes you to call interrupt when the current speech disallows interruptions or when no speech is active.
Quick checks to try
• Search your code for say() / generate_reply() calls and confirm whether allow_interruptions is set. If you want barge-in, set:
await session.say("...", allow_interruptions=True)
# or
session.generate_reply(..., allow_interruptions=True)
• When interrupting, use force or guard the call:
# safer interrupt
if session.current_speech:
await session.current_speech.interrupt()
# or force
session.interrupt(force=True)
• Add logging around speech start/stop and interrupt calls to catch races:
<http://logger.info|logger.info>("starting speech")
handle = await session.say(...)
<http://logger.info|logger.info>("interrupting")
await session.interrupt(force=True)
If you prefer, share the snippets where you: 1) call say() / generate_reply() and 2) call session.interrupt() (or any place you trigger interrupt), and I’ll point out the exact change to avoid the RuntimeError.
Sources: Turns overview | LiveKit docs | Agent session | LiveKit docs | Agent speech and audio | LiveKit docs | LiveKit turn detector plugin | LiveKit docs