what's the use of `max_endpointing_delay`?
# ask-ai
f
what's the use of
max_endpointing_delay
?
t
Thanks for reaching out, Ayush. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
max_endpointing_delay
is a configuration parameter in LiveKit's voice agent system that sets the maximum amount of time the system will wait before deciding a user has finished speaking when it's uncertain whether they're done. • When the system's turn detector is uncertain about whether the user is done (low confidence), it waits up to
max_endpointing_delay
seconds (default: 6.0s) before triggering a response. • When the turn detector is confident, it uses the shorter
min_endpointing_delay
(default: 0.5s). • This helps avoid premature interruptions, especially for users who pause mid-sentence or in complex conversational patterns. •
max_endpointing_delay
only has effect if a turn detector model is being used. You can configure this parameter per session, for example:
Copy code
session = AgentSession(
    min_endpointing_delay=0.5,  # High confidence
    max_endpointing_delay=5.0,  # Low confidence
)
The goal is to balance responsiveness with not cutting off users who haven’t actually finished speaking. Citations: #7d3a2bdc-5248-4a6f-98c3-d482a08ac091, #28b38d53-5c4a-45eb-bc3d-76f51cb57676, #a5510711-aef0-484b-8bfb-226a6ac9f504 Sources: Turn detection and interruptions | LiveKit Docs | Speech & Audio Processing | livekit/livekit_composite | DeepWiki | tests/test_agent_session.py
f
What should be the value of max_endpointing_delay in cases where user responses are very large and might contain multiple pauses in between.
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!