Building Voice Agents with Voice Live and Custom Speech
This lesson explains the Voice Live API for low-latency speech-to-speech agents and custom speech for recognizing domain vocabulary, since a voice agent must respond quickly, handle interruptions and recognize the vocabulary of its domain.
Learning outcomes
After completing this lesson, you will be able to:
- Describe what the Voice Live API combines.
- Explain when custom speech improves recognition.
- Design responses that suit listening rather than reading.
Voice Live API
The Voice Live API provides low-latency speech-to-speech interaction over a WebSocket connection. It combines speech recognition, a generative model or a Foundry agent and speech synthesis in one managed service, with noise suppression, echo cancellation, semantic turn detection (knowing when the user has finished speaking) and interruption handling, so users can speak over the agent. It supports standard and custom voices and avatars, and can connect directly to an existing Foundry agent so the voice experience reuses the agent's tools and knowledge.
Realtime audio models, such as gpt-realtime, accept and produce audio directly through the Realtime API over WebRTC or WebSocket. Both approaches avoid the latency of a sequential recognize-call-synthesize chain.
The following diagram compares a sequential voice chain with the Voice Live API.

The following screenshot shows the Voice Live playground: a generative model (GPT Realtime) with response instructions, speech input with automatic language detection, semantic voice activity detection and audio enhancement, a high-definition output voice and function calling for tools.

Build the voice agent
Custom speech
Base speech models may misrecognize product names, jargon, accents or speech in noisy environments. Custom speech adapts a base model with training data. The following list shows the data types and what each improves.
- Plain text: domain sentences that improve recognition of vocabulary and phrasing.
- Structured text with pronunciations: unusual words and names.
- Audio with human-labelled transcripts: accents, speaking styles and acoustic conditions.
A custom model is evaluated by word error rate (WER) on a test set against the base model, then deployed to a custom endpoint that the application or Voice Live uses. Phrase lists are a lighter alternative: they boost a short list of words at runtime with no training, which suits names that change often, such as today's product codes.
Train custom speech
Designing voice conversations
Voice changes how an agent must behave. Users cannot scroll back or skim, so responses must be short and structured for listening: one idea at a time, numbers and dates spoken clearly, and important details such as amounts confirmed back to the user. Instructions written for a chat agent, with tables, links or long lists, must be rewritten for voice.
Latency is the other main design concern. People expect a reply within about a second, so the system streams audio as soon as the first words are generated, keeps tool calls fast, and can say a short acknowledgement while a slow tool runs. Interruption handling lets users correct the agent mid-sentence, and the agent should recover gracefully when recognition is uncertain, for example by asking the user to repeat or to spell a name.
A drive-through ordering agent
A restaurant chain builds a voice ordering agent. Customers interrupt frequently, there is engine noise, and menu item names such as "McFlurrito" are often misrecognized. Responses must start within a second.
Use the Voice Live API connected to the ordering agent for low latency, noise suppression and interruption handling, and a custom speech model (or phrase lists for the menu) to recognize item names, measured by WER on recorded orders. A chain of batch transcription, an agent call and synthesis would be far too slow.
A few names change every day and must be recognized. What should be used?
Show answer
Phrase lists, supplied at runtime. Custom speech models suit broad domain vocabulary and accents.
Exam Tips
Remember for the exam
- Low-latency, interruptible voice agents: Voice Live API or realtime audio models.
- Domain vocabulary and accents: custom speech, evaluated by word error rate.
- A few changing names at runtime: phrase lists.