What does min_consecutive_speech_delay do in the l...
# ask-ai
c
What does min_consecutive_speech_delay do in the livekit agent python sdk
t
Thanks for reaching out, Guillaume. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The
min_consecutive_speech_delay
parameter in the LiveKit Agent Python SDK is there to help create a more natural and clear conversation by adding a little pause between consecutive speech utterances from the agent. This means it sets the minimum delay (in seconds) between back-to-back responses, preventing them from sounding rushed or overlapping. By default, this delay is set to
0.0
seconds, so there’s no enforced pause unless you decide to configure it. When you specify a positive value, the agent will wait at least that amount of time after finishing one speech segment before starting the next one, making the interaction feel smoother. This delay happens during the scheduling of speech tasks in the agent’s internal priority queue and works independently from other timing controls. You can set it up in two ways: • At the
Agent
level when you initialize it, using the
min_consecutive_speech_delay
argument. • At the
AgentSession
level when you start a session. If you happen to set it in both places, just keep in mind that the value at the
Agent
level will take priority over the one at the
AgentSession
level. Sources: livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/s... | Agent Session & Client Integration | livekit/livekit_composite | DeepWiki