← Back to Blog
AI EngineeringAgentsLLMs

Voice AI Agents: Latency Budgets, Cascaded vs Speech-to-Speech, and What Breaks in Production

A voice agent that answers in 2 seconds feels broken. Here is how to budget latency per stage, choose between a cascaded STT→LLM→TTS pipeline and speech-to-speech APIs, and handle barge-in and turn detection.

By Joinloop·21 October 2026·8 min read
ShareLinkedInXReddit
🎙️

Text chat forgives slow responses. Voice does not. In human conversation the gap between turns is a few hundred milliseconds, and when your agent takes two seconds to reply, users assume the call dropped and start talking again. Then your agent talks over them, and the experience is finished.

Most teams building their first voice agent wire together a speech-to-text API, an LLM, and a text-to-speech API, get a demo working on localhost, and then discover that production phone calls feel nothing like the demo. This post covers where the time goes, the two main architectures, and the failure modes that only show up with real callers.

The latency budget

A commonly cited target for natural-feeling conversation is roughly 700–800 ms from the moment the user stops speaking to the moment they hear the first audio of the reply. Treat that as a rule of thumb, not a standard. Your use case (a patient intake line vs. a game NPC) shifts the tolerance.

In a cascaded pipeline, that budget gets split across stages:

Stage What happens Typical contribution Main lever
Endpointing Decide the user finished speaking 200–500 ms of silence wait Better turn detection, not a shorter fixed timeout
STT finalisation Final transcript after end of speech 50–300 ms Streaming STT, not chunked batch
LLM time-to-first-token Model starts generating 200–600 ms Smaller model, prompt caching, short prompts
TTS time-to-first-audio First audio chunk synthesised 100–300 ms Streaming TTS, start on first sentence
Network/telephony Round trips, codec, jitter buffer 50–200 ms Co-locate services, avoid extra hops

These numbers are illustrative ranges, not benchmarks. Measure your own stack. The important insight: endpointing is often the single largest line item, and it is the one most teams never measure.

Two architectures

Cascaded (STT → LLM → TTS). Audio streams to a speech-to-text model, the transcript goes to a text LLM, and the LLM's output streams into a TTS model. You pick best-of-breed for each stage.

Speech-to-speech (S2S). A single multimodal model consumes audio and emits audio directly (for example, OpenAI's Realtime API or similar offerings from other vendors). Fewer hops means lower latency and better preservation of tone and interruptions.

Dimension Cascaded Speech-to-speech
Latency Higher, tunable per stage Lower out of the box
Observability Full transcripts at each stage Harder to inspect intermediate state
Swap components Yes (STT, LLM, TTS independently) No, tied to one vendor/model
Tool calling Mature, text-based Supported, but check vendor docs for current behaviour
Compliance / PII redaction Easy: redact the transcript between stages Harder: audio goes straight through
Cost model Sum of three services Per audio token/minute, single bill
Self-hosting Possible Mostly cloud-only

A reasonable default: start cascaded if you need auditability, redaction, or custom vocabulary. Start with S2S if conversational feel is the product and you can accept less visibility. Many teams run both and route by use case. Check each vendor's current docs for pricing and feature support; this space moves fast.

Note that S2S APIs typically speak WebSocket or WebRTC, while phones speak SIP/PSTN. You still need a telephony bridge (Twilio Media Streams, LiveKit, Pipecat, or similar). The model is one component; telephony, tools, and observability are still yours.

A minimal cascaded pipeline

Here is the shape of a streaming cascaded loop in Python. It is deliberately vendor-neutral: stt_stream, llm_stream and tts_stream stand in for whichever SDKs you pick.

import asyncio
import re

SENTENCE_END = re.compile(r"(?<=[.!?])\s+")

async def handle_turn(transcript: str, history: list[dict], tts_queue: asyncio.Queue):
    history.append({"role": "user", "content": transcript})
    buffer = ""
    full_reply = ""

    async for token in llm_stream(history):          # your LLM SDK, streaming
        buffer += token
        full_reply += token
        # Flush to TTS at the first sentence boundary, not at end of reply
        parts = SENTENCE_END.split(buffer)
        if len(parts) > 1:
            for sentence in parts[:-1]:
                await tts_queue.put(sentence)
            buffer = parts[-1]

    if buffer.strip():
        await tts_queue.put(buffer)
    await tts_queue.put(None)                        # end-of-turn marker
    history.append({"role": "assistant", "content": full_reply})


async def speak(tts_queue: asyncio.Queue, audio_out, cancel: asyncio.Event):
    while True:
        sentence = await tts_queue.get()
        if sentence is None or cancel.is_set():
            return
        async for chunk in tts_stream(sentence):     # your TTS SDK, streaming
            if cancel.is_set():                      # barge-in: stop mid-sentence
                return
            await audio_out.write(chunk)

Two details matter here. First, flush to TTS on the first sentence boundary; waiting for the whole LLM reply adds seconds. Second, every playback loop must check a cancel flag so the agent shuts up when the user interrupts.

Barge-in and turn detection

Barge-in means the user talks while the agent is speaking. Handling it correctly requires:

  1. Voice activity detection (VAD) running on the inbound audio during agent playback.
  2. Immediately cancelling TTS playback and flushing any buffered audio on the outbound side.
  3. Truncating the assistant message in your history to what was actually spoken. If the agent planned a 40-word answer and was cut off at word 12, the model should not believe the user heard all 40.

Turn detection is the harder half. A fixed silence timeout of 500 ms cuts people off mid-thought ("My account number is… [pause] …4471") and also adds 500 ms to every clean turn. Better options:

  • Semantic endpointing: a small model or the STT vendor's built-in end-of-turn signal that considers whether the sentence is grammatically complete.
  • Adaptive timeouts: short wait after a complete sentence, longer wait after trailing words like "and", "so" or digits in progress.
  • Backchannel awareness: "uh-huh" from the caller should not cancel the agent's response.

Pitfalls that only appear with real callers

Pitfall Symptom Fix
Narrowband phone audio (8 kHz) STT accuracy drops vs. your 16 kHz tests Test with real telephony audio; pick STT models trained for it
Echo / the agent hears itself Agent interrupts itself, loops Echo cancellation, or mute inbound VAD sensitivity during playback
Numbers and names misheard Wrong account lookups Read back and confirm critical values; give STT a custom vocabulary
Long tool calls Dead air for 3+ seconds Speak a filler ("Let me check that") before slow calls
Markdown/emoji in LLM output TTS reads "asterisk asterisk" System prompt: plain spoken sentences only; strip formatting before TTS
Long monologues Callers tune out Instruct for short turns, one question at a time
No transcripts logged Cannot debug or evaluate Log per-turn audio, transcript, timestamps for each stage

Evaluating a voice agent

Text evals do not transfer directly. Track at least:

  • Time to first audio (p50 and p95, not average). Tail latency is what users remember.
  • Interruption rate and false-interruption rate (agent cut off by noise or backchannel).
  • Task completion on scripted scenarios with simulated callers.
  • Word error rate on critical entities (names, numbers, dates), not overall WER.

A practical loop: record real calls (with consent and PII handling in place), transcribe them, and mine failures into a replayable test set, the same way you would for a text agent.

Checklist before you ship

  • Measured per-stage latency on real phone audio, p95 under your budget
  • Streaming at every stage; TTS starts on the first sentence
  • Barge-in cancels playback and truncates history to what was spoken
  • Endpointing tuned beyond a fixed timeout
  • Filler phrases for tool calls longer than ~1 second
  • Critical values (numbers, names) are read back for confirmation
  • Transcripts and timing logged per turn, PII policy defined
  • Human handoff path for when the agent is stuck
  • Recording-consent and AI-disclosure requirements checked for your jurisdictions

Next steps

Build a cascaded prototype first, since it exposes every stage and teaches you where your latency goes. Instrument it, then decide whether an S2S API earns its place. Verify vendor claims against current official documentation before committing, as model names, pricing, and capabilities change quickly.

If you want to build production agents like this with feedback from practitioners, our Joinloop engineering cohort walks through agents, evals, and deployment hands-on. Product managers scoping voice features can look at the PM cohort.

ShareLinkedInXReddit

Want to build this yourself?

Join a live cohort and go from reading about AI to shipping it, with practitioners who do it daily.