VAD vs Turn Detection: How a Voice Agent Knows You Finished Talking

15 min read

The problem

A pharmacy runs a voice agent for prescription refills. A caller says: "Hi, I need a refill on prescription four two seven..." and then stops, because they are reading the rest of the number off a crumpled label. One second of silence. Then: "...nine one three."

An agent has to decide, during that second, whether the caller is done. If it decides "done" too early, it jumps in with "Sorry, I didn't catch a full prescription number", talks over the caller, and the call goes downhill. If it waits too long after every pause, normal turns get slow, and slow replies sound hesitant or unhelpful (the timing research is in part 2).

There are two different questions hiding here, and most voice agent bugs in this area come from mixing them up:

  1. Is there speech in this audio right now? That is voice activity detection (VAD).
  2. Has this person finished their turn? That is turn detection, also called end-of-turn detection or endpointing.

Silence answers the first question. It does not answer the second. This post covers both, the tools that exist for each, the settings that control the wait, and the tradeoff you cannot avoid.

Animation: a caller pauses mid-number. VAD reports silence both times, a turn detector keeps listening through the first pause, and VAD alone would end the turn too early.

VAD: speech or not speech

A VAD looks at a short slice of audio (WebRTC VAD takes 10, 20 or 30 ms frames, and LiveKit's Silero plugin updates every 32 ms) and outputs "speech" or "not speech" (or a probability). It knows nothing about words or meaning. A voice agent uses it to know when to start listening, to detect that the caller started talking over the agent (barge-in, covered in part 4), and to measure how long the caller has been silent.

Two VADs show up again and again.

Silero VAD

Silero VAD is a small neural network, MIT licensed. Its repository says one audio chunk of 30 ms or more takes under 1 ms on a single CPU thread, the JIT model is about 2 MB, it supports 8 kHz and 16 kHz audio, and it was trained on data covering more than 6,000 languages. Here is the basic usage from the repository README, as an example:

python
# pip install silero-vad   (usage as shown in the snakers4/silero-vad README)
from silero_vad import load_silero_vad, read_audio, get_speech_timestamps

model = load_silero_vad()
wav = read_audio("refill_call.wav")
speech = get_speech_timestamps(wav, model, return_seconds=True)
# speech is a list of {"start": ..., "end": ...} segments in seconds

That offline function is useful for analyzing recordings. In a live agent, frameworks run Silero on a stream instead. LiveKit Agents wraps it as a plugin, and its reference docs list these defaults on silero.VAD.load():

ParameterDefaultMeaning
min_speech_duration0.05 sSpeech needed before a speech segment starts
min_silence_duration0.55 sSilence to wait after speech before ending the segment
prefix_padding_duration0.5 sAudio kept from before speech started
activation_threshold0.5Probability above which a frame counts as speech
deactivation_thresholdmax(activation_threshold minus 0.15, 0.01)Probability below which speech ends
sample_rate160008000 or 16000 only

LiveKit's docs describe the threshold tradeoff plainly: a higher threshold is more conservative but might miss soft speech, and a lower one is more sensitive but might count noise as speech. The reference docs also recommend loading the model in a prewarm step, because loading blocks.

Pipecat also uses Silero. Its speech input docs list VADParams with start_secs 0.2 and stop_secs 0.2 by default, plus confidence and min_volume.

WebRTC VAD

The older option is the VAD from Google's WebRTC project, available in Python as webrtcvad (the webrtcvad-wheels package on PyPI, version 2.0.14.post1 at the time of writing). It is not a neural network. It takes 16-bit mono PCM at 8, 16, 32 or 48 kHz, in frames of exactly 10, 20 or 30 ms, and has an "aggressiveness" mode from 0 to 3, where higher filters out more non-speech. Example based on the PyPI page:

python
# pip install webrtcvad-wheels   (API as shown on the PyPI page)
import webrtcvad

vad = webrtcvad.Vad()
vad.set_mode(1)                      # 0 = least aggressive, 3 = most

sample_rate = 16000
frame_ms = 30                        # must be 10, 20 or 30
frame = b"\x00\x00" * (sample_rate * frame_ms // 1000)  # 30 ms of silence

print(vad.is_speech(frame, sample_rate))

Both answer the same question. Neither knows that "four two seven..." is half a prescription number.

Endpointing: turning silence into a decision

The simplest turn logic is: "if the VAD says silence for X seconds, the turn is over." That X is the endpointing delay, and it is a pure tradeoff. A short X cuts off the pharmacy caller mid-number. A long X adds the same wait to every single turn, including the ones where the caller clearly finished ("Yes, that's right.").

Frameworks usually split it into two numbers:

  • Minimum delay: the shortest wait before a turn can end, even when the system is confident.
  • Maximum delay: the longest wait, even when the system thinks the caller is not finished, so a caller who trails off is not left in silence forever.

LiveKit Agents documents these as endpointing.min_delay (default 0.5 s) and endpointing.max_delay (default 3.0 s), with lower defaults of 0.3 s and 2.5 s when its turn detector model is active. In plain VAD mode, the docs say the actual wait is the larger of the VAD's silence setting and min_delay. With LiveKit's Silero defaults that is max(0.55 s, 0.5 s) = 0.55 s on every turn.

flowchart TD
    A[VAD reports silence] --> B{Waited at least min delay}
    B -- no --> A
    B -- yes --> C{Turn model says done}
    C -- yes --> E[Commit the turn and reply]
    C -- no --> D{Waited max delay}
    D -- no --> F[Keep listening]
    F -- still quiet --> C
    F -- caller speaks again --> R[Reset the wait]
    R --> A
    D -- yes --> E

Flowchart: how minimum and maximum endpointing delays bound the wait. LiveKit defaults: 0.5 s and 3.0 s, or 0.3 s and 2.5 s with its turn detector.

LiveKit also offers a dynamic endpointing mode. Its reference docs describe it as tracking a running average (an exponential moving average, with alpha 0.9 by default) of the pauses between a caller's utterances and between their turns, so the wait adapts to how that particular caller talks. A slow, careful speaker gets more patience than a fast one.

Speech-to-text services often have their own endpointing too, so check every layer. Deepgram's endpointing docs, for its Nova models, say it is on by default at 10 ms of silence and can be set with a value such as endpointing=500. It is also VAD-based, which means it only knows about silence.

Turn detection models: listening for "done"

People do not decide turn ends from silence alone. As the conversation research in part 2 shows, listeners predict the end of a turn from grammar, meaning and intonation, and start planning before the other person stops. Turn detection models try to give an agent a small version of that ability.

There are two kinds of cue they can use:

Cue typeWhat it looks atExample from the refill line
AcousticPitch, intonation, rhythm, trailing "um""four two seven..." said with a flat, unfinished tone
SemanticWords and the conversation so farA prescription number that is too short to be valid
ContextWhat the agent just askedAfter "How many refills?", the single word "Two" is a complete answer

Three current options, each documented by its vendor.

LiveKit turn detector

LiveKit's docs describe TurnDetector as a multimodal model: it reads the agent's last message and listens to the caller's audio (intonation, pitch, rhythm), and it does not need the caller's transcript. The docs give the example that "Seven" is a complete answer to "How many guests?" but not to a request for a phone number, which is exactly the refill-line problem.

What the docs say about it:

  • Two versions: v1 runs on LiveKit Inference (LiveKit's hosted model service), and v1-mini runs locally on CPU and is free. LiveKit Cloud and dev mode default to v1, and self-hosted production defaults to v1-mini.
  • Built into livekit-agents 1.8.12 and later for Python, and @livekit/agents 1.10.0 and later for Node.
  • An unlikely_threshold parameter (lower means more eager to end the turn) and a local_fallback option, on by default.
  • If no prediction arrives within about a second, the turn is committed anyway.
  • 14 languages, including English, Hindi, Arabic and Chinese.
  • v1-mini weights take about 310 to 340 MB per copy, and the docs recommend compute-optimized instances, not burstable ones.
  • The older text-only turn detector (MultilingualModel) is deprecated and scheduled for removal in 2.0.

This is the shape shown on LiveKit's Agents SDK product page, with the Silero VAD added (LiveKit recommends pairing them). It is an example, not something run for this post:

python
# livekit-agents 1.8.12+ (Python); TurnDetector form from LiveKit's Agents SDKs page
from livekit.agents import AgentSession, TurnHandlingOptions, inference
from livekit.plugins import silero

session = AgentSession(
    vad=silero.VAD.load(),
    turn_handling=TurnHandlingOptions(
        turn_detection=inference.TurnDetector(),
    ),
    # stt=..., llm=..., tts=...
)

The turn_handling reference also accepts a plain dict with endpointing, interruption and preemptive_generation keys, shown in the TurnHandlingOptions docstring in the LiveKit source, for example {"endpointing": {"min_delay": 0.3}}. Python takes seconds, Node takes milliseconds. Other turn_detection values are "vad", "stt", "realtime_llm" and "manual" (push-to-talk, where your code calls session.commit_user_turn()).

Pipecat Smart Turn

Smart Turn is an open model from the Pipecat project, BSD-2-Clause licensed, at version 3.2 in its repository. It is audio-only: it hears the last up to 8 seconds of 16 kHz mono audio and decides whether the speaker sounds finished. Per the repository, it uses a Whisper Tiny backbone with a linear classifier, about 8M parameters, in an 8 MB int8 CPU build and a 32 MB fp32 GPU build. The repo's demo pair is "I can't seem to, um ..." (not finished) versus "I can't seem to, um, find the return label." (finished).

Published speed, as stated by the Pipecat project: "as little as 10ms on some CPUs, and under 100ms on most cloud instances", and about 65 ms on a standard Pipecat Cloud 1x instance. The docs list 23 supported languages.

In Pipecat, Smart Turn is the default way to end a user turn: the speech input docs name TurnAnalyzerUserTurnStopStrategy with LocalSmartTurnAnalyzerV3. The model runs when the VAD reports a pause. Its parameters, from the Smart Turn overview docs:

SmartTurnParams fieldDefaultMeaning
stop_secs3.0Silence fallback that ends the turn even if the model says "not finished"
pre_speech_ms500Audio kept from before speech started
max_duration_secs8.0Longest audio window the model looks at

Note the two different stop_secs. The VAD's stop_secs (0.2 s) is how long a pause must be before Smart Turn is even asked. Smart Turn's stop_secs (3.0 s) is the maximum wait, the same role as LiveKit's max_delay.

sequenceDiagram
    participant C as Caller
    participant V as VAD
    participant T as Smart Turn
    participant A as Agent
    C->>V: prescription four two seven
    C->>V: pause to read the label
    Note over V: silence for VAD stop_secs 0.2 s
    V->>T: is the caller done
    T-->>V: not finished, keep listening
    C->>V: nine one three
    C->>V: goes quiet
    Note over V: silence for VAD stop_secs 0.2 s
    V->>T: is the caller done
    T-->>A: finished, commit the turn
    A->>C: reply starts
    Note over T,A: if the model keeps saying not finished, Smart Turn stop_secs 3.0 s ends the turn anyway

Sequence: Pipecat's documented defaults on the refill line. VAD hears silence twice, but only the second pause ends the turn.

Pipecat also offers text-based strategies that judge whether the transcript is complete, for example holding the turn open on "I'd go to Japan because I love", and by default all stop strategies must agree before a turn ends. (The Pipecat doc pages render their code samples in a way that did not come through when fetched for this post, so this section describes the documented classes and parameters instead of showing code.)

Deepgram Flux

Flux is a Deepgram speech-to-text model that does turn detection inside the STT service, so the end-of-turn signal arrives together with the final transcript. Its configuration docs list three settings:

ParameterRangeDefaultWhat it does
eot_threshold0.5 to 1.00.7Confidence needed to send EndOfTurn
eager_eot_threshold0.3 to 0.9not setEnables an earlier EagerEndOfTurn event, plus TurnResumed if the caller keeps going
eot_timeout_ms500 to 600005000Ends the turn after this much silence regardless

The eager event is Deepgram's version of preemptive generation: you can start the LLM on EagerEndOfTurn and throw the draft away on TurnResumed. Deepgram says this trades lower latency for more LLM calls, and that the eager transcript matches the final one exactly when the turn is not resumed. Setting eot_threshold to 1.0 turns off its own decisions so you can end turns yourself. Example, using the parameter names and string values from the Flux configuration docs, in the same with ... as connection pattern Deepgram's Python examples use:

python
# Deepgram Python SDK, listen v2 (parameters per Deepgram's Flux configuration docs)
with client.listen.v2.connect(
    model="flux-general-en",
    eot_threshold="0.7",
    eager_eot_threshold="0.4",
    eot_timeout_ms="6000",
) as connection:
    ...

In LiveKit, Flux's built-in end-of-turn is used when you set turn_detection="stt". LiveKit's turns overview notes that the bundled VAD still handles interruptions in that mode.

Four ways to decide a turn is over

LiveKit's turn detection guide groups the options into four strategies, and the list is a useful map even if you use another framework:

  • VAD only. Wait for a set amount of silence after speech stops. Simple, but every reply pays the full silence threshold. Their own example: an 800 ms silence timeout adds close to a second to every response before anything else runs.
  • STT endpointing. Use the end of utterance event your speech to text provider sends. The guide calls this a solid default for most production agents on a managed STT service.
  • Model based detection. A small classifier reads the partial transcript and predicts whether the sentence is finished, so it can fire before the trailing silence is over. It needs tuning so it does not fire on unfinished sentences.
  • Realtime model turn taking. A speech to speech model decides when to answer by itself. Fewer moving parts, less control (more on that in part 5).

The guide's main point matches this post: VAD is an input to turn detection, not the same thing.

The tradeoff: cutting people off vs leaving them waiting

Every option above is a way of moving along the same line. At one end, the agent replies fast and sometimes interrupts. At the other end, it never interrupts and always feels slow. A turn model moves the whole line in your favor, because it can end clear turns early and hold unclear ones open, but it does not remove the line.

LiveKit's tuning docs boil the troubleshooting down to two directions, which match this tradeoff:

SymptomWhat LiveKit's docs suggest
Agent cuts callers offUse the turn detector, raise min_delay
Agent feels slowKeep preemptive generation on, consider preemptive_tts, lower min_delay, try dynamic endpointing

Some practical reasoning for the refill line. These are my opinions, not measured results:

  • Know where callers read things out. Prescription numbers, dates of birth and phone numbers come with long mid-turn pauses. A context-aware turn model helps most here, because the agent's last question ("What's the prescription number?") is exactly the context it needs.
  • Do not let the maximum wait get huge. A caller who stops mid-number and then goes quiet still needs a prompt eventually. Somewhere between LiveKit's 2.5 to 3.0 s defaults and Deepgram's 5 s default, the agent should say something like "Take your time, I'm listening."
  • Change waits per question if your framework allows it. LiveKit's reference docs say endpointing options can be updated at runtime, so a longer minimum delay while collecting a number and a shorter one for yes/no confirmations is a reasonable design.
  • Use plain VAD where the turn model cannot help. LiveKit's docs suggest VAD-only mode for the lowest latency or for languages the turn detector does not support.
  • Make interruptions cheap to recover from. Even with a good model, some turns will be cut off. LiveKit truncates the conversation history to what the caller actually heard, and its interruption settings (a 0.5 s min_duration, a 2.0 s false_interruption_timeout, and resuming after false interruptions, all defaults per the tuning docs) exist so a cough does not derail a reply. That is the subject of part 4.

How to tell whether your settings are working

Turn settings are easy to tune by feel and hard to tune by data. LiveKit's observability docs expose per-turn values that separate the turn decision from the rest: end_of_turn_delay and transcription_delay on the user's message, and e2e_latency (from the user stopping to the agent starting to respond) on the agent's reply. If end_of_turn_delay dominates slow turns, your endpointing is the problem. If it is small but callers still complain about being cut off, the turn ends are too eager. Part 8 covers how to collect and read these per turn at p50 and p95, and part 9 puts the VAD and turn detector into a working LiveKit agent.

One more check if your callers come in over the phone network instead of a browser: confirm the sample rate your audio actually arrives at. Silero (and LiveKit's plugin) accepts 8 kHz or 16 kHz, while Smart Turn's repository specifies 16 kHz input, so a mismatch somewhere in the chain is worth ruling out. The telephony side is covered in how a phone call reaches an AI voice agent.

New to a term used here? The series glossary defines VAD, endpointing, barge-in, full-duplex, MCP, p95 and the rest in plain language.

Sources