Cutting Voice Agent Latency: VAD, Prompts, Streaming
A stage-by-stage method for reducing the pause between a caller finishing a sentence and an AI voice agent replying, from VAD tuning to prompt compression and streaming.
Voice agent latency is the gap between a caller finishing a sentence and hearing the agent's reply. In chat, a two-second delay is fine. On a phone call, it sounds like the line dropped, and the caller says "hello?" right as the bot starts talking, which derails the whole turn.
I spent a significant part of building Antoc's Hinglish sales calling agent on latency: VAD tuning, prompt compression and making every stage stream. This post is the method I use, stage by stage, with the trade-offs at each step.
TL;DR
Break the delay into stages and measure each: end-of-speech detection, speech-to-text finalization, LLM time to first token, TTS time to first audio, and network hops. Tune VAD endpointing carefully, cut the system prompt and tool list down hard, stream LLM output straight into TTS, and keep tool calls fast or move them off the critical path.
key takeaways
- Voice agent latency is a sum of stages, so measure each one separately before optimizing anything.
- VAD endpointing is often the largest hidden delay, and tuning it is a trade-off between speed and cutting callers off.
- Shorter system prompts and fewer tool definitions directly reduce time to first token.
- Stream everything: partial transcripts, LLM tokens and TTS audio, so the caller hears the first words while the rest is still being generated.
Build a latency budget first
You cannot fix what you do not measure. Before changing anything, I log timestamps for every stage of a turn across a batch of real test calls. A simple budget looks like this:
| Stage | What happens | Main lever |
|---|---|---|
| End-of-speech detection | VAD decides the caller has stopped | Silence threshold, endpointing settings |
| STT finalization | Final transcript is produced | Streaming STT, model choice |
| LLM time to first token | Model starts responding | Prompt size, model, region |
| LLM to first sentence | Enough text exists to speak | Short replies, sentence chunking |
| TTS time to first audio | First audio bytes are ready | Streaming TTS, voice choice |
| Network and telephony | Audio travels to the caller | Co-locating services |
Plot these per turn. You will usually find one or two stages dominate. In my experience, the surprises are endpointing and prompt size, not the model's raw speed.
Stage 1: VAD and endpointing
Voice activity detection decides when the caller has finished speaking. Set the silence threshold too long and every turn starts with dead air. Set it too short and the agent jumps in while the caller is pausing mid-thought, which is worse.
What I tune:
- Silence duration before end of turn. Start conservative, then reduce in small steps while listening to real calls.
- Minimum speech length. Ignore very short noises like coughs or "hmm" so they do not trigger a turn.
- Context-aware waiting. After the agent asks for a phone number or budget, callers pause more while thinking, so a slightly longer wait there avoids cutting them off.
- Interruption handling. When the caller starts talking during agent speech, stop TTS immediately and listen.
Code-mixed Hinglish speech made this harder, because natural pauses differ when people switch languages or search for a word. There is no universal setting; you tune against recordings of your actual callers.
Stage 2: Prompt compression
Time to first token grows with input size. A voice agent prompt often starts as a long document: persona, rules, project details, objection handling, examples and a dozen tool schemas. Every turn pays for all of it.
How I cut it down:
- Remove prose, keep rules. Rewrite paragraphs as terse bullet rules. Models follow compact instructions well.
- Inject only relevant context. Pass the specific project and lead details for this call, not the whole inventory.
- Trim tools. Keep only the tools this call type needs, with short descriptions and minimal parameters.
- Summarize history. On long calls, compress earlier turns rather than resending the full transcript.
- Use provider caching where available. Stable prefixes can be cached by several providers; see the Gemini context caching docs for one approach.
Prompt compression also tends to improve behavior. A shorter prompt has fewer contradictions for the model to trip over.
Stage 3: Stream every stage
The single biggest structural win is never waiting for a stage to finish completely.
- Streaming STT sends partial transcripts, so the system can prepare while the final transcript arrives.
- Streaming LLM output lets you cut the reply at the first sentence boundary and send that to TTS immediately.
- Streaming TTS starts playing audio as soon as the first chunk is synthesized.
Combined with short replies, this means the caller hears the start of the answer while the rest is still being generated. Instruct the model to put the most important words first, so even if the caller interrupts, the key point landed.
Stage 4: Tool calls on the critical path
A voice agent that updates a CRM calls tools mid-conversation. If saving a site visit takes a second on the backend, that second is added to the pause.
My rules for tool calls in voice:
- Make endpoints narrow and indexed. A tool that updates one lead by ID should be fast.
- Defer non-critical writes. Logging a call note can happen after the turn or at the end of the call.
- Avoid chained calls in one turn. Design tools so one call does the job.
- Keep services close. Run the backend in the same region as the voice infrastructure when possible.
How I built this in practice
Antoc's voice agent is a Hinglish sales caller using Sarvam STT and TTS with Gemini, connected through a voice platform, and it updates leads through tool calls into a Node/Express and MongoDB backend running on GCP in asia-south1. The latency work was iterative: record test calls, read the per-stage timings, change one thing, repeat.
VAD tuning and prompt compression gave the most noticeable improvements, because the early versions waited too long to decide a caller had finished and carried a heavy prompt into every turn. Keeping the CRM tools narrow, backed by an indexed database that had already been hardened as leads grew past 300K, meant tool calls did not become the new bottleneck. Read more in the Antoc case study, or see my US hiring page if you are building a voice product from the States.
Common mistakes
- Optimizing the model choice before measuring where the delay actually is.
- Using one VAD silence threshold for every question type.
- Shipping a long, prose-heavy system prompt that every turn has to process.
- Waiting for the full LLM response before starting text-to-speech.
- Doing slow, chained backend writes inside the conversation turn.
- Hosting STT, LLM, TTS and backend in different regions far from callers.
keep reading
FAQ
What is a good response time for an AI voice agent?+
Human conversation has very short gaps between turns, so the closer you get to about a second from the caller stopping to the agent speaking, the more natural it feels. Beyond roughly two seconds, callers start repeating themselves or assume the line dropped.
What causes the most latency in voice bots?+
In my experience the usual culprits are conservative end-of-speech detection, large prompts that slow the first LLM token, waiting for a full LLM response before starting TTS, and slow tool calls to backend systems. Network distance between components adds up too.
Does a faster LLM fix voice agent latency?+
It helps, but it is rarely the whole answer. If VAD waits too long or TTS only starts after the full reply is generated, a faster model still leaves noticeable pauses. Fix the pipeline first, then pick the model.
How do you handle slow tool calls during a call?+
Make the backend endpoints fast and narrow, run non-critical writes after the turn, and let the agent say a short natural acknowledgment while a necessary lookup runs. Avoid chaining several tool calls inside one turn.
Devang Gandhi
AI & full stack developer at Passdn, building CRMs, SaaS, AI agents and Flutter apps for clients in the US, UK, Australia, UAE and India. More about me