Speaker Notes

Engineering voice agents: Latency, quality, and scale — Rishabh Bhargava, Together AI

Building production voice agents requires orchestrating low-latency speech-to-text, LLM, and text-to-speech pipelines while managing network co-location and guardrails.

AI Engineer · 24:35 · YouTube ↗

Talk · solo speaker  Intermediate · concepts and production architecture

Highlights

3 clips · 5 min of 25 min
    • Network latency across disparate data centers adds significant overhead to real-time voice applications.
    • Co-locating models and the agent orchestrator in the same data center yields up to a 30 percent latency reduction.
    • Speech-to-speech models preserve user tone, emotion, and hesitation that are lost during text transcription.
    • They enable full-duplex communication where the model can back-channel and handle interruptions naturally.
    • Guardrail interventions must happen before text-to-speech synthesis because spoken audio cannot be easily retracted.
    • A smaller thinker model can handle immediate filler responses while delegating complex tasks and guardrails to a larger model.

Questions this video answers

12 · every answer cites the moment it was said
01 Why do voice agents require such strict latency thresholds? 2 sources · 2:55

Humans naturally respond to conversational cues within 300 milliseconds. If an AI response takes longer than 500 milliseconds, users will immediately notice, and delays over a second will cause them to hang up. Therefore, keeping latency extremely low is critical for usability.

02 What components make up the dominant voice agent pipeline architecture? 2 sources · 4:36

The standard pipeline streams audio chunks through an agent orchestrator to three sequential components. First, a speech-to-text system converts audio to text, which is then fed into an LLM to determine tool calls and responses. Finally, a text-to-speech model turns the text output back into audio chunks for the user.

03 What performance metrics matter most for speech-to-text models? 2 sources · 5:25

The primary metrics are quality, measured by word error rate, and latency, measured by time to complete a transcript. State-of-the-art models typically achieve around a 6% word error rate on open benchmarks. Getting this right is vital because downstream LLMs and TTS models will inherit any transcription errors.

04 How are streaming-native speech-to-text models different from batch models like Whisper? 2 sources · 7:25

Older batch models like Whisper were trained on 30-second audio clips, requiring complex chunking and padding workarounds for streaming. Newer streaming-native models use specialized encoders trained with short look-ahead times and cached activations. This allows them to process small audio steps without redoing heavy computations.

05 What size range should LLMs fall into for voice agent pipelines? 2 sources · 8:44

LLM streaming latency is measured by time to first token, and you generally want to hit 200 to 300 milliseconds. To meet this latency budget while maintaining sufficient intelligence for tool calling, models typically need to be in the 8 to 30 billion parameter range. Going larger blows the latency budget, while going smaller hurts reasoning capabilities.

06 How do we measure the performance of text-to-speech models? 2 sources · 9:50

Performance is evaluated using time to first audio and the real-time factor, which measures how many seconds of audio can be produced per second of processing time. Quality is also critical and is best assessed by directly listening to audio samples rather than relying solely on objective metrics. You typically want a real-time factor under one to avoid buffering issues.

07 Why should I co-locate my models and agent orchestrator? 2 sources · 13:33

Running models in distant data centers introduces network latency that adds up quickly in real-time systems. Co-locating your models and agent orchestrator in the same data center can drop network latency from 75 milliseconds down to 5 milliseconds. This yields a massive 30% reduction in total latency for an already optimized setup.

08 Why aren't pure speech-to-speech models used more widely in production yet? 2 sources · 15:10

Pure speech-to-speech models process audio natively without converting it to text first, preserving tone and emotion while enabling full duplex communication. However, they currently struggle with complex instruction following and reliable tool calling in production. Developers often resort to prompt engineering before eventually falling back to pipeline architectures.

09 How do you evaluate tool calling for voice agent LLMs? 2 sources · 17:35

Tool calling evaluations assess whether the generated function call structure is correct and whether the output is feasible for the use case. Teams often aim for near 100% structural correctness in their tool calls. To achieve this with smaller LLMs constrained by latency budgets, developers fine-tune models on use-case-specific data.

10 Where should guardrails and classifiers be placed in the voice pipeline? 2 sources · 20:13

Guardrail models and classifiers can be introduced right before the main LLM to route requests, or placed at the end of the generation step to screen responses. While adding these components introduces extra latency and management overhead, catching issues before the TTS model runs is essential. If a policy violation slips through, you cannot take back spoken words.

11 What is the thinker-talker pattern and when should I use it? 2 sources · 21:34

The thinker-talker pattern uses a small LLM to instantly generate a filler response like letting the user know it is thinking. Simultaneously, it issues a tool call to a larger, more capable model with better instructions and guardrails. This pattern helps hide latency and improves response quality when your main model is too slow for real-time conversation.

12 How do observability and evaluations change for future full duplex models? 2 sources · 23:32

Future speech-to-speech models eliminate traditional text-to-text and text-to-speech intermediate steps, rendering standard component-level evals obsolete. Instead, teams must rely on transcription sidecars for auditability and shift toward longer, full duplex conversational metrics. Most of these comprehensive evaluations will happen on top of the base inference API.

Section-by-section summary

5 parts

Why voice matters and core challenges

Voice agents provide a natural human interface for complex workflows, but engineering them requires strict real-time responses under 500 milliseconds. Systems must also deliver high baseline intelligence, natural-sounding voice quality, and reliability at concurrent scale.

The dominant pipeline architecture

Production voice agents typically use a cascading pipeline of speech-to-text, an LLM, and text-to-speech models orchestrated together. Each component introduces latency and error budgets, making precise component optimization critical for the overall experience.

Co-locating components to cut network latency

While engine latency dominates model execution, network hops between distributed data centers add massive overhead. Co-locating the models and agent orchestrator in the same data center can drop latency by 30 percent.

The promise of pure speech-to-speech models

Speech-to-speech models bypass text conversion, preserving emotional nuances, hesitation, and enabling true full-duplex communication with natural interruptions. However, they currently lag behind pipelines in instruction following and reliable tool calling.

Production evals and the thinker-talker pattern

Adding guardrails and classifiers to voice pipelines threatens latency budgets when bad content must be intercepted before TTS generation. Developers use patterns like a smaller thinker LLM handling immediate responses while delegating complex tasks to larger models.

0:00 / 24:35
k play/pause · f fullscreen · m mute
n next · p previous clip · t highlights/full
< > slower/faster · / search what was said
  • Pipeline architecture6× · first 1:16

    A cascading multi-model architecture combining speech-to-text, LLM, and text-to-speech for voice agents.

  • Word error rate1× · first 5:19

    A metric measuring the percentage of incorrect words in a model-generated transcript compared to a reference transcript.

  • Time to first token2× · first 8:40

    The streaming latency metric measuring how long an LLM takes to produce its first output token.

  • Real-time factor1× · first 9:45

    A metric measuring the ratio of audio generation time to processing time in text-to-speech models.

  • Speech-to-speech model1× · first 14:34

    A single integrated model that directly processes and generates audio without intermediate text conversion.

  • Thinker-talker pattern1× · first 21:34

    An architectural pattern using a fast small LLM for immediate filler responses while a larger model processes complex tasks.