Building Production Audio Agents with Real-Time Speech-to-Speech Models

openai · Tech · 2025 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.5 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Real-time voice and audio agents

OpenAI's solution architecture team needed to show how teams can build production audio agents now that speech-to-speech models are becoming viable. The core problem is designing voice agents that balance latency, cost, accuracy, user experience, tools, evaluation, guardrails, and handoffs without assuming one model architecture fits every use case.

Constraints:

Architecture

The recommended architecture uses OpenAI's real-time API as a speech-to-speech frontline agent when low-latency conversation matters. That frontline agent handles normal interaction, easy questions, voice expressiveness, and user-facing flow. For harder reasoning or business-policy decisions, it delegates through tool calls to specialized backend agents or smarter models such as O3/O4 mini. Conversation-state summaries are passed across handoffs. Observability starts with traces of audio and agent behavior, evaluation proceeds through human labeling, transcription-based LLM-as-judge checks, audio-specific tone/pacing review, and synthetic conversations, while guardrails run asynchronously in the latency gap between generated text and spoken audio.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  user-audio-input["User audio input"] --> real-time-api-frontline-agent["Real-time API frontline agent"]
  voice-prompt-contract["Voice prompt contract"] --> real-time-api-frontline-agent
  real-time-api-frontline-agent --> limited-tool-set["Limited tool set"]
  real-time-api-frontline-agent --> backend-specialist-agents["Backend specialist agents"]
  conversation-state-summary["Conversation-state summary"] --> backend-specialist-agents
  backend-specialist-agents --> real-time-api-frontline-agent
  real-time-api-frontline-agent --> async-guardrails["Async guardrails"]
  async-guardrails --> spoken-audio-output["Spoken audio output"]
  real-time-api-frontline-agent --> spoken-audio-output
  real-time-api-frontline-agent --> observability-traces["Observability traces"]
  observability-traces --> human-audio-labeling["Human audio labeling"]
  observability-traces --> transcription-based-evals["Transcription-based evals"]
  observability-traces --> audio-specific-evals["Audio-specific evals"]
  observability-traces --> synthetic-conversation-tests["Synthetic conversation tests"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
User audio input Live speech from a user in a voice or audio-agent interaction. Real-time API frontline agent
Real-time API frontline agent Speech-to-speech user-facing agent that handles transcription, interaction, intelligence, and speech output for low-latency conversation. User audio input, Voice prompt contract, Limited tool set, Backend specialist agents, Async guardrails, Spoken audio output, Observability traces
Voice prompt contract Specifies behavior, conversation stages, demeanor, tone, enthusiasm, pacing, and voice expressiveness. Real-time API frontline agent
Limited tool set Focused set of tools attached to a given voice agent to avoid overloading one model with too many capabilities. Real-time API frontline agent, Backend specialist agents
Backend specialist agents More capable or specialized models invoked through tool calls for harder policy, reasoning, refund, or cancellation tasks. Real-time API frontline agent, Conversation-state summary
Conversation-state summary Serialized handoff context passed between agents so the next agent retains relevant conversation state. Real-time API frontline agent, Backend specialist agents
Async guardrails Safety checks that run on generated text in parallel with speech synthesis, with configurable debounce frequency. Real-time API frontline agent, Spoken audio output
Spoken audio output Generated voice response returned to the user after voice prompting and guardrail handling. Real-time API frontline agent, Async guardrails
Observability traces Captured agent traces, audio inputs/outputs, intermediate states, and tool calls used for evaluation and debugging. Real-time API frontline agent, Human audio labeling, Transcription-based evals, Audio-specific evals, Synthetic conversation tests
Human audio labeling Humans listen to conversations and label quality or issues for prompt and behavior iteration. Observability traces
Transcription-based evals LLM-as-judge, function-calling, rubric, and business-criteria checks over transcripts. Observability traces
Audio-specific evals Audio-model checks for tone, pacing, intonation, and voice characteristics not visible in text transcripts. Observability traces
Synthetic conversation tests Two real-time clients simulate production agent and customer personas to generate conversation-scale eval data. Observability traces

Data flow

A user speaks to the voice agent. In a speech-to-speech design, the real-time API handles transcription, intelligence, and speech generation inside one model rather than chaining three models. The frontline agent follows voice-specific prompts for tone and flow, uses a limited tool set, and delegates hard tasks to specialized backend agents when needed. Handoff summaries preserve conversation state. Generated text becomes audio, while asynchronous guardrails inspect generated text before problematic speech reaches the user. Traces, human labels, transcription-based evals, audio evals, and synthetic conversations feed iteration.

5 supporting quotes
“the real-time API be your like frontline agent. So it does a lot of the normal interaction patterns that you're used to.”transcript, stated
“you want your model to like do a tool call to these other agents that are run by smarter models behind the hood.”transcript, stated
“it really it takes these three models into a um single model which for us it's the real-time API uh and it does all these layers it does the transcription it does that intelligence layer and then finally does the speech as the output. So this simplifies the”transcript, stated
“summarizing the conversation state and then passing it to the other agents so you don't lose any of the the context”transcript, stated
“generated text from the real-time API is much faster than the spoken audio that you get back from the model. So you have room to play with the latency here.”transcript, stated

Why this architecture

Speech-to-speech is preferred when low latency and natural conversation dominate because it removes the chained architecture's three-model latency and semantic loss. But the talk explicitly frames architecture as use-case dependent: consumer voice apps may prioritize real-time expressiveness, while customer-service workflows may accept chained designs for accuracy, determinism, and integrations. Backend delegation keeps the frontline audio model responsive while routing specialized reasoning elsewhere, and async guardrails preserve safety without blocking spoken interaction.

5 supporting quotes
“stitching together three models. There's a lot of problems with this. slow across time like it takes longer time to actually generate your output audio.”transcript, stated
“This is really good for low latency experiences. Um and it doesn't have that lossiness problem. You actually are able to maintain semantic understanding across a conversation. So this is really kind of the emerging pattern we see. And when building there's”transcript, stated
“cost, you have accuracy and intelligence, user experience and integrations and tooling. And depending what you're building, your trade-offs will be different. Right? So if for example you're talking about a consumerf facing application, um the trade-offs are quite different. Here”transcript, stated
“if you care about determinism and accuracy and intelligence, then actually the chained architecture would make a lot of sense here, too.”transcript, stated
“run them async uh generally because the generated text from the real-time API is much faster than the spoken audio”transcript, stated

Models used: OpenAI real-time API · speech-to-speech model · O3 mini · O4 mini · GPT-4 Audio · LLM-as-judge models

Scale

Alternatives considered (roads not taken)

Chained STT -> LLM -> TTS architecture

Rejected because: For low-latency conversational experiences it compounds latency and loses semantic audio context, though it may still fit accuracy/determinism-heavy customer-service cases.

“You have audio come in, you transcribe it, you have some sort of intelligence layer with an LLM that does some sort of intelligence, and then finally text to speech on the output. Um, but again, this is stitching together three models. There's a lot of”transcript, stated
“slow across time like it takes longer time to actually generate your output audio. Um it also has some lossiness”transcript, stated

Give one voice agent 10 or 20 tools

Rejected because: The recommended approach is to keep each agent's tools limited and delegate different task types to other agents/models.

“you don't need to connect 10 tools or like 20 tools to a given model. Uh keep the number of tool calls pretty limited”transcript, stated
“maybe goes back to the first diagram we showed of you want to delegate to different models or agents to do different tasks. So here a given agent don't give it a ton of tools to start with and then slowly add on more tools as needed. Um handoffs. So if you ever you uh use the agents”transcript, stated

Evaluate only from transcripts

Rejected because: Transcripts cover many checks but cannot fully capture tone, pacing, intonation, and other voice-experience qualities.

“the things that maybe it does get you is like understanding the tone, understanding the pacing, or other things that are maybe a bit harder to capture just through text.”transcript, stated

Block the real-time response path for guardrails

Rejected because: Blocking would harm latency; generated text arrives before spoken audio, so guardrails can run asynchronously before playback.

“generated text from the real-time API is much faster than the spoken audio that you get back from the model. So you have room to play with the latency here.”transcript, stated

Patterns

latency-optimization (voice-architecture)

The speech-to-speech real-time API collapses transcription, intelligence, and speech generation into one model to reduce response latency.

“it really it takes these three models into a um single model which for us it's the real-time API”transcript, stated
“Really reduces the time it takes to output. This is really good for low latency experiences.”transcript, stated

multi-agent-orchestration (agent-architecture)

A low-latency frontline audio agent delegates harder tasks to smarter backend agents or models through tool calls.

“the real-time API be your like frontline agent. So it does a lot of the normal interaction patterns”transcript, stated
“do a tool call to these other agents that are run by smarter models behind the hood.”transcript, stated

tool-use-orchestration (agent-tools)

Voice agents use a limited set of tools directly and route specialized tasks to other agents instead of overloading one agent with many tools.

“Uh keep the number of tool calls pretty limited for a given agent. Uh and that maybe goes back to the first diagram we showed of you want to delegate to different models or agents to do different tasks.”transcript, stated
“a given agent don't give it a ton of tools to start with and then slowly add on more tools as needed.”transcript, stated

context-compaction (handoff)

Before handing a voice interaction to another agent, the system summarizes conversation state so context is preserved without passing the full raw history.

“summarizing the conversation state and then passing it to the other agents so you don't lose any of the the context”transcript, stated

guardrails-io-filtering (safety)

Guardrails run asynchronously on generated text while audio synthesis/playback is still pending, with configurable debounce frequency.

“run them async uh generally because the generated text from the real-time API is much faster than the spoken audio”transcript, stated
“right now it runs every 100 characters to run the guardrails but you can control that if you want to.”transcript, stated

eval-driven-development (evaluation)

The voice-agent evaluation stack starts with traces and human labels, then adds transcript-based LLM judges, audio-specific checks, and synthetic conversations.

“always start with observability. um you're not going to get very far if you don't know how your data looks.”transcript, stated
“two real-time clients going back and forth across to each other. So maybe one is your real-time API agent”transcript, stated

Tradeoffs

Use speech-to-speech for low-latency experience

Chose Real-time API single-model architecture over A three-model chained STT/LLM/TTS architecture.

Rationale: Speech-to-speech simplifies the architecture, reduces time-to-output, and preserves more semantic conversation understanding.

“this simplifies the architecture quite dramatically. Really reduces the time it takes to output.”transcript, stated
“doesn't have that lossiness problem. You actually are able to maintain semantic understanding across a conversation.”transcript, stated

Route harder tasks to backend models

Chose Frontline voice agent with backend specialist delegation over One real-time voice model handling all reasoning and policy decisions.

Rationale: The frontline agent can stay responsive while more capable models handle harder tasks such as refund-policy decisions.

“we're actually using like a much smaller model04 mini uh and delegating to that”transcript, stated
“It looks like the return you are making is within the 30-day return policy.”transcript, stated

Run guardrails asynchronously

Chose Parallel generated-text checks before audio reaches users over Blocking the real-time response path.

Rationale: Generated text appears before the spoken audio, providing room to run safety checks without adding obvious user-perceived latency.

“So you have room to play with the latency here. Uh the next thing also is you have control to set like whatever debounce period you have here.”transcript, stated
“right now it runs every 100 characters to run the guardrails but you can control that if you want to.”transcript, stated

Use human labeling early

Chose Humans listening and labeling audio-agent behavior over Only automated evals from the beginning.

Rationale: The presenters say human labeling is the most effective evaluation method they have seen with customers and accelerates prompt iteration.

“the most important thing is actually havememes to label these data um and actually go and iterate on prompts from there.”transcript, stated
“it is the most effective that we've seen when working with customers. Um it lets you go a lot faster.”transcript, stated

Gotchas (what bit them)

Chained audio architectures can feel too slow and lose conversational nuance.

Root cause: Separate transcription, LLM, and TTS calls compound latency and transform information between modalities.

Resolution: Use speech-to-speech real-time models when the use case prioritizes low latency and natural conversation.

“stitching together three models. There's a lot of problems with this. slow across time”transcript, stated
“you kind of lose a little bit of the semantic understanding of the conversation.”transcript, stated

Architecture choice changes by use case; real-time is not automatically best.

Root cause: Consumer apps optimize for latency and expressiveness, while customer-service systems may prioritize accuracy, determinism, and integrations.

Resolution: Choose between speech-to-speech and chained designs based on latency, cost, accuracy, user experience, and tooling constraints.

“You have latency, you have cost, you have accuracy and intelligence, user experience and integrations and tooling.”transcript, stated
“if you care about determinism and accuracy and intelligence, then actually the chained architecture would make a lot of sense here, too.”transcript, stated

Voice agents need prompt controls that text agents do not.

Root cause: Voice quality includes sound, tone, pacing, enthusiasm, and expressiveness, not just content correctness.

Resolution: Experiment with voice-specific prompts, staged conversation instructions, and sample voices to tune brand behavior.

“in voice based applications, you can also control the expressiveness of the voice and how you want the model to speak or sound.”transcript, stated
“control like the demeanor, the tone, the level of enthusiasm, all those things that don't really get captured in a in a text agent”transcript, stated

Context can become lossy during agent handoffs.

Root cause: A different backend model or specialist agent may not share the full conversational state from the real-time agent.

Resolution: Summarize conversation state and pass it during handoff.

“handoffs as well. So the thing to remember here is you might have a given agent and you're going to another one but you want to keep the context the same between them. Um so a good pattern to do is actually summarizing the conversation state and then passing it to the other agents so you don't”transcript, stated
“summarizing the conversation state and then passing it to the other agents”transcript, stated

Audio quality cannot be fully evaluated from text transcripts.

Root cause: Tone, pacing, intonation, and emotional expression matter to the user experience but may disappear in transcription.

Resolution: Combine transcription-based evals with audio-capable model checks and human listening.

“understanding the tone, understanding the pacing, or other things that are maybe a bit harder to capture just through text.”transcript, stated
“for example GT4 audio to like understand the tone, the pacing and what other intonations that you care about”transcript, stated

Evaluation

The talk recommends a layered evaluation strategy: start with observability and traces of audio/agent behavior, use human labeling to iterate quickly, add transcription-based LLM-as-judge and function-call evals, add audio-specific tone/pacing checks with audio-capable models, and use synthetic real-time conversations for scale.

Metrics: Trace availability for audio, intermediate states, and tool calls. · Human labels on conversation quality and prompt issues. · Transcription-based rubric/judge scores. · Function-calling accuracy against business criteria. · Audio tone, pacing, and intonation checks. · Synthetic conversation coverage across customer personas.

5 supporting quotes
“make sure you have traces of what's going on with your agents uh the audio and everything so you can actually look at it and take actions.”transcript, stated
“transcription based evals. So this is where you would have your traditional as a judge evals”transcript, stated
“testing your function calling performance on certain business criteria and having a rubric in place.”transcript, stated
“you can simulate like many many of those conversations and then extract those evals across maybe like transcriptions or audio”transcript, stated
“Lemonade so uh AI like insurance company they're like building e one of the things we like noticed from them that made them successful is they like focused really early on eval guardrails”transcript, stated

Outcomes

The source is a solution-architecture guidance talk rather than a single deployment report; scale is expressed as production readiness, customer examples, and the real-time API's new snapshot.

4 supporting quotes
“we do believe, at that good enough tipping point where you can start to build much more reliable experiences around it.”transcript, stated
“And depending what you're building, your trade-offs will be different. Right? So if for example you're talking about a consumerf facing application, um the trade-offs are quite different.”transcript, stated
“It looks like the return you are making is within the 30-day return policy. We will process the return”transcript, stated
“Tinder, um, they realized that customization and brand realism was pretty important for them when they were launching their RZ chat experience.”transcript, stated