Please explain the turn detector plugin's *`unlike...
# ask-ai
n
Please explain the turn detector plugin's
unlikely_threshold
parameter.
t
Thanks for reaching out, Coin. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd love to help you out! Could you please share a bit more about how you're using the
unlikely_threshold
parameter in the turn detector plugin? For instance, are you working with a particular SDK, API, or maybe a specific use case? This will help me understand your situation better and assist you more effectively.
n
unlikely_threshold
is a floating point parameter for both
livekit.plugins.turn_detector.english
&
livekit.plugins.turn_detector.multilingual
but there's no explanation I can find as to what it does or what increasing or decreasing the value would do.
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!
n
The
unlikely_threshold
parameter in LiveKit's turn detector plugins (
livekit.plugins.turn_detector.english
and
livekit.plugins.turn_detector.multilingual
) controls the sensitivity of end-of-turn detection by adjusting the waiting time before declaring a user's turn complete. ## How it works: 1. End-of-turn prediction: The turn detector uses a language model to predict a probability (0-1) that the user has finished speaking based on the conversation context. 2. Threshold comparison: If the predicted end-of-turn probability is below the
unlikely_threshold
, the system considers it "unlikely" that the user has finished speaking. 3. Endpointing delay adjustment: - When the probability is above the threshold: uses
min_endpointing_delay
(default 0.5 seconds) - When the probability is below the threshold: uses
max_endpointing_delay
(default 6.0 seconds) ## Impact of changing the value: - Higher values (e.g., 0.8): More conservative - requires stronger evidence that the user has finished speaking before allowing quick turn completion. This reduces false positives (interrupting users who haven't finished) but may increase response latency. - Lower values (e.g., 0.3): More aggressive - allows quicker turn completion even with weaker evidence. This reduces latency but increases the risk of interrupting users prematurely. - Default behavior: Each language has its own tuned threshold stored in the model's
languages.json
configuration file. The comment in the code warns that overriding this is "not recommended unless you're confident in the impact." ## Practical effect: The threshold essentially controls how long the system waits before responding. A low threshold means the agent responds more quickly but might interrupt users, while a high threshold means the agent waits longer but is less likely to cut users off mid-sentence.