explain @session.on("agent_false_interruption")
# ask-ai
b
explain @session.on("agent_false_interruption")
t
Thanks for reaching out, Jupiter. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking about
@session.on("agent_false_interruption")
. Here's what it does and how to use it. What it means • This event fires when the system detected an interruption (agent was cut off) but no actual user speech was received within the configured timeout—i.e., a false positive from voice activity detection (VAD). • The default timeout is
false_interruption_timeout
= 2 seconds. If no final transcription arrives in that window, the interruption is considered false. What happens when it triggers • By default, the agent can resume speaking from where it left off if
resume_false_interruption
is
True
. • You can use the event to log false interruptions, adjust UI state, update metrics, or tweak detection sensitivity. Example (Python)
Copy code
@session.on("agent_false_interruption")
def on_false_interruption():
    print("False interruption detected; resuming playback.")
    # custom logic: resume agent TTS, increment metric, etc.
When to handle it • If background noise or brief non-speech sounds cause unwanted truncation of agent speech. • If you need custom handling (e.g., show a UI hint, retry TTS, or change VAD parameters). If you want, tell me which SDK/language you're using and whether you need sample code to resume playback or adjust the timeout/behavior. Sources: Turns overview | LiveKit docs
b
I use python, so it will continue speaking when detecting false intertuption right
t
Yes — in Python the agent will resume speaking automatically after a false interruption if
resume_false_interruption
is set to
True
(this is the default). If you want to confirm or change the behavior: • Check/set
resume_false_interruption=True
in your session/config. • Optionally adjust
false_interruption_timeout
(default 2s) to shorten or lengthen the wait before it’s treated as false. If you’d like, I can show a short Python example that sets these options and demonstrates resuming playback.