if allow_interruptions is False for session.say() ...
# ask-ai
i
if allow_interruptions is False for session.say() will the agent STT ignore any user speech during the time of that speech generation?
t
Thanks for reaching out, Ed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand this can be a bit confusing, so let me help clarify. When you set
allow_interruptions=False
in
session.say()
, it doesn't stop the agent's STT system from hearing you. The STT system keeps listening and recognizing your speech as usual. What changes is that the framework won't allow interruptions during the agent's speech based on that setting. So, even though the agent detects your speech through STT, it won’t interrupt what it’s currently saying. Your words will still be transcribed and can be added to the conversation once the agent finishes talking, depending on how the framework is managing the flow. I hope this helps clarify things! Sources: Turn detection and interruptions | LiveKit Docs | livekit-agents/livekit/agents/voice/agent_session.py
i
so the user_transcribed_input even will still fire during the agents non-interruptible speech?
t
Absolutely! The
user_input_transcribed
event will still fire during the agent's non-interruptible speech when
allow_interruptions=False
. This is designed so the system can keep detecting and processing what the user says, even though the agent's speech won’t be interrupted. If you have any more questions about this, I’m here to help! Sources: basics/repeater.py | Turn detection and interruptions | LiveKit Docs | livekit-agents/livekit/agents/voice/agent_activity.py | Text and transcriptions | LiveKit Docs