Information in this post reflects publicly available sources as of November 1, 2026.
You call a support line and an AI agent answers. You ask a question, and then nothing happens for two seconds. You start to repeat yourself, and at that exact moment the agent starts talking too.
Both of you stop. It apologizes and starts again from the beginning, and you are already reaching for the zero key to find a human.
The agent behind that call might have the same model, prompts, and tools as an excellent text chatbot. What failed was not intelligence but timing. Voice is the one interface where a correct answer delivered a second too late, or over the top of the caller, counts as a wrong answer.
This post covers how voice agents are built, why their hardest problems are latency and turn-taking rather than reasoning, and what it takes to make one feel like a conversation instead of a phone tree.
The problem: conversation runs on a tight clock
Human conversation is fast. Research comparing turn-taking across ten languages found that the typical gap between one speaker finishing and the next starting is around 200 milliseconds. People plan their reply while the other person is still talking, and they notice pauses much longer than that.
A text model works the other way around. It waits for the complete input, then starts generating. In a chat window, a second or two of thinking is fine, because the user can see that something is happening. On a phone line, silence is ambiguous: is the agent thinking, did the call drop, or should I keep talking?
Voice also removes the structure that text gives you for free. There is no send button marking the end of a message. People pause mid-sentence, say "um," change their minds, and talk over each other. The agent has to decide, continuously and in real time, whether the caller is finished, and whether to stop talking when they start.
How it works
Two architectures
There are two ways to build the core of a voice agent. A cascaded stack chains three models: speech-to-text transcribes the caller, a text model decides what to say and calls tools, and text-to-speech turns the reply into audio. A speech-to-speech stack uses one realtime model that takes audio in and produces audio out directly.
Cascaded stacks are still the most common in production. Each stage can be measured, logged, and swapped independently, you can use any text model with all its mature tool-calling support, and the transcript gives you a natural audit trail. The cost is latency, since each hop adds delay, and lost nuance: the text model sees words, not tone, hesitation, or emphasis.
Speech-to-speech models close both gaps. With fewer hops they respond faster, and because they hear the audio, they can pick up on frustration or uncertainty and respond with more natural intonation. The trade-off is visibility and flexibility: debugging happens inside one model, you are tied to one provider's model, and tool calling in realtime models is newer and has rougher edges.
The latency budget
Whichever architecture you choose, design starts with a latency budget: how long the caller waits between finishing and hearing the first syllable of the reply. Teams commonly aim for under about 800 milliseconds, and delays beyond a second or so start to feel broken.
The budget is spent in surprising places. Model thinking is significant, but often the largest single slice is end-of-turn detection: waiting long enough to be confident the caller has actually finished. Then come the final transcript, the model's first token, the first chunk of synthesized audio, and network hops between each service.
The only way to fit in the budget is to stream everything. Transcription runs while the caller speaks, so the text is ready the moment they stop. The text model streams tokens, and speech synthesis starts on the first phrase rather than waiting for the full reply. A cascaded stack that waits for each stage to finish before starting the next will blow through any budget.
Location matters too. Every network hop between services adds tens of milliseconds, and a stack that sends audio from Europe to a transcription service in the United States, then to a model in another region, wastes much of its budget in transit. Co-locate the components, and put them near your callers.
Knowing when the caller is done
The simplest turn detector is voice activity detection (VAD): treat a fixed stretch of silence, say 500 milliseconds, as the end of the turn. It is fast and predictable, and it fails in both directions. Set it short and the agent interrupts people who pause to think. Set it long and every reply feels sluggish.
Better detectors look at what was said, not just the silence. "My account number is four, seven, two" followed by a pause probably is not finished; "that's all, thanks" probably is. Semantic turn detection uses a small model to predict whether the utterance is complete, waiting longer after incomplete thoughts and responding quickly after complete ones. Most realtime APIs and voice frameworks now offer it, at the cost of a little extra latency.
Handling interruptions
Callers interrupt, and a good agent stops talking when they do. Handling this barge-in correctly takes more than stopping the audio.
When the caller starts speaking, the agent must cancel the response being generated, clear any audio already buffered on the device, and fix its own memory. That last step is the one teams miss. The model generated the whole reply, but the caller only heard the first second of it. If the model's history still contains the full reply, it will believe it told the caller things they never heard.
Realtime APIs handle much of this when you use their built-in turn detection, but the client still has to report how much audio actually played. With OpenAI's Realtime API over a WebSocket, for example, the event handling looks roughly like this:
import json
def on_event(ws, player, event):
kind = event["type"]
if kind == "response.output_audio.delta":
player.enqueue(event["delta"], item_id=event["item_id"]) # play audio as it streams
elif kind == "input_audio_buffer.speech_started":
# The caller is talking over the agent. Built-in turn detection cancels the
# response; the client must stop playback and record what was actually heard.
played_ms, item_id = player.stop_and_flush()
if item_id:
ws.send(json.dumps({
"type": "conversation.item.truncate",
"item_id": item_id, "content_index": 0, "audio_end_ms": played_ms,
}))
elif kind == "response.function_call_arguments.done":
result = run_tool(event["name"], json.loads(event["arguments"]))
ws.send(json.dumps({"type": "conversation.item.create", "item": {
"type": "function_call_output", "call_id": event["call_id"],
"output": json.dumps(result)}}))
ws.send(json.dumps({"type": "response.create"})) # speak the result
The handler does three jobs: it plays audio as it arrives, it stops and truncates on interruption, and it runs tools and asks the model to continue. The truncate event is the memory fix: it trims the model's record of its reply to the milliseconds the caller actually heard. Frameworks such as LiveKit Agents and Pipecat wrap this logic so you rarely write it by hand, but knowing it exists explains many strange voice bugs.
Tools without dead air
Voice agents call the same tools as text agents, such as looking up an order or booking an appointment, but a slow tool is much more painful on a call. Three seconds of silence while a database query runs sounds like a dropped line.
The usual fixes are conversational. Have the agent say something short before slow calls, such as "Let me pull that up," which buys a few seconds naturally. Keep tools fast and narrowly scoped, with results small enough to summarize aloud. And for long operations, let the conversation continue while the tool runs, then return to the result, which several realtime APIs now support.
When to use it, and when not
Voice agents fit tasks that people already do by phone and that follow a recognizable shape: scheduling, order status, simple account changes, qualifying inbound leads, and first-line triage before a handoff. They also fit hands-busy settings, such as driving, cooking, field work, and accessibility needs, where typing is impractical.
They are a poor fit when the caller needs to see something, such as a long list of options, a document, or a comparison table. Voice is linear and memory-limited; anything over three choices is hard to follow by ear. They are also a poor fit for high-stakes or emotional conversations, where a misheard word or a mistimed interruption does real damage. There, a voice agent should collect details and hand off to a person quickly.
Choose the architecture by what you need to control. If you need detailed logs, a specific text model, or strict compliance review of every word, start cascaded. If natural conversation and speed matter most, and the task is simple enough to trust to one provider's realtime model, start with speech-to-speech.
What goes wrong
Mishearing the important part. Speech recognition is very good at everyday words and much worse at names, email addresses, account numbers, and product codes. Confirm critical values by reading them back, spell-check against known records, and offer a text message or keypad entry for anything that must be exact.
Talking over the caller, or never stopping. Turn detection tuned in a quiet office fails on a noisy street or a speakerphone. Background voices trigger false barge-ins, while noise masks real ones. Test with recordings from the real environments your callers use, including noisy ones.
Reading text aloud. A reply written for a screen sounds terrible when spoken: bullet points, URLs, markdown symbols, long numbers, and parenthetical asides. Instruct the model to write for the ear, with short sentences and spoken numbers, and normalize the output before synthesis.
Slowing down over long calls. As the conversation grows, every turn processes more history, and latency creeps up. Keep the context bounded: summarize older turns, drop tool results once they have been used, and keep the system prompt lean.
Voice-specific security. Callers can attempt prompt injection by speaking, and voice cloning makes caller identity weak evidence. Never treat "this sounds like the account holder" as authentication, and apply the same tool permissions and approvals as for text agents, as covered in the prompt injection and guardrails posts.
Cost, latency, and complexity
Voice is usually priced per minute or per audio token, and it costs more than text for the same conversation. Audio carries far more tokens than its transcript, and a cascaded stack pays three vendors. Model costs commonly land in the range of a few cents to around ten cents per conversational minute, before telephony and infrastructure, so check current pricing for the specific models you use.
The comparison that matters is against the alternative, which is usually a person's time or a missed call. A five-minute automated call costing well under a dollar can be very economical, provided it actually resolves the request. Measure cost per resolved call, not per minute, because a cheap agent that transfers most callers to a human saves nothing.
Complexity is higher than for text agents. You are running a realtime media system: audio codecs, WebRTC or telephony connections, jitter, echo cancellation, and region placement, on top of the model work. This is why most teams start with an orchestration framework or a managed voice platform rather than building the media layer themselves.
The current landscape
For speech-to-speech, OpenAI's Realtime API, generally available since August 2025, supports WebRTC, WebSocket, and SIP connections for phone calls. Google's Gemini Live API offers low-latency streaming of audio and video over WebSockets. Open models such as Kyutai's Moshi explore full-duplex conversation, where the model can listen and speak at the same time. Model names and versions in this space change frequently, so check each provider's current documentation.
For cascaded stacks, common speech-to-text providers include Deepgram, AssemblyAI, and the major clouds, and common text-to-speech providers include ElevenLabs and Cartesia. Open-source orchestration frameworks such as LiveKit Agents and Pipecat handle streaming, turn detection, and interruptions across providers. Managed platforms such as Vapi, Retell AI, and ElevenLabs Agents bundle telephony and orchestration for teams that want to configure rather than build.
For evaluation, treat voice like any agent, with extra metrics: time to first audio at the 50th and 95th percentile, false interruption rate, transcription accuracy on critical fields, and task completion. The evals and observability posts apply directly; voice just adds a clock to every check.
Summary
A voice agent is a text agent wrapped in a realtime system, and the wrapper is where most of the difficulty lives. Choosing an architecture, streaming every stage, deciding when the caller has finished, stopping cleanly when interrupted, and filling the gaps around slow tools matter more to the caller's experience than which model writes the words.
So design voice agents around time. Set a latency budget and measure against it at the 95th percentile, invest in turn detection, keep the model's memory faithful to what the caller actually heard, and confirm anything that must be exact. A slightly less clever agent that answers promptly and listens well will beat a brilliant one that keeps people waiting.
Part of the Applied AI series: AI from the builder's side.