When should I set `discard_audio_if_uninterruptibl...
# ask-ai
m
When should I set
discard_audio_if_uninterruptible=True
?
t
Thanks for reaching out, Daniel. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Think of the
discard_audio_if_uninterruptible=True
setting as your way to politely ignore any user audio while the agent is talking and can’t be interrupted. This helps keep things smooth by making sure the system doesn’t accidentally react to user input during those moments, avoiding any awkward overlaps or confusion. Usually, this is set to
True
by default. So, if your agent is set up not to allow interruptions (like with
allow_interruptions=False
), any user audio during that time gets gently set aside instead of being processed. It’s a handy feature when you want to deliver important or longer messages without interruptions. If you do want to catch and work with user audio while the agent is speaking, just switch it to
False
. That way, you can save or analyze that input later on. Sources: livekit-agents/livekit/agents/voice/agent_activity.py
m
I have
allow_interruptions=True
so it is not relevant for me?
t
That's right! When you set
allow_interruptions=True
, the
discard_audio_if_uninterruptible
setting doesn’t really come into play. Since interruptions are allowed, your user audio won’t be discarded no matter what value you have for
discard_audio_if_uninterruptible
. Hope that clears things up!