Skip to main content
← Back to Blog
Voice AI Architecture · Technical Guide

How AI Voice Agents Work: STT, Realtime Speech, LLMs, TTS, Telephony and Tool Calling

A production AI voice agent is not simply “ChatGPT connected to a phone.” It is a realtime system where telephony, audio transport, conversation timing, reasoning, business logic, tools, speech generation, monitoring and human handoff have to work together.

Published · By B2B Voice

Quick answer

An AI voice agent connects a live audio channel to a conversation system that can understand speech, maintain state, use knowledge or business tools, and return spoken responses in realtime. Some systems use a cascaded pipeline—speech-to-text, reasoning, then text-to-speech—while newer audio-native systems can process and generate audio more directly. In either architecture, real business actions such as checking a calendar, reading a CRM record, creating an appointment or transferring a caller typically happen through controlled external tools and telephony systems rather than inside the language model itself.

Key takeaways

  • There is no single universal AI voice-agent architecture.
  • Cascaded systems and realtime audio-native systems are both valid production approaches.
  • Voice quality is only one layer; timing, tools, failure handling and business outcomes matter just as much.
  • The language model usually does not “do” the business action itself. It requests or proposes an action; authorized software executes it.
  • Latency is a waterfall across multiple components, not one model-speed number.
  • Interruptions are a state-management problem, not merely an audio-stop event.
  • A production voice agent should be tested as both a conversation system and a business transaction system.

What actually happens when you talk to an AI voice agent?

Imagine calling a dental office and saying: “Hi, I’d like to book a cleaning next Tuesday afternoon.”

From the caller’s perspective, this sounds like one simple sentence. Behind the scenes, a production system may need to coordinate several layers:

1
The call is connected. A phone network, browser or mobile client establishes a live media session.
2
Audio enters the voice system. Encoded audio frames are streamed into the realtime session.
3
The system detects the caller’s turn. VAD, endpointing or semantic turn detection helps determine when the caller is speaking and when the turn may be complete.
4
The request is understood. A cascaded system may use STT first; an audio-native system may interpret the audio directly.
5
The agent determines what information is missing. It may need service type, date, customer identity or other details.
6
An external system is queried. The agent asks an authorized tool to check actual calendar availability.
7
The caller chooses a valid option. The agent confirms the exact appointment before a write operation.
8
The booking system creates the appointment. The external system returns an authoritative success or failure result.
9
The agent confirms the result. The spoken confirmation should reflect what the business system actually did.
10
Post-call workflows may continue. CRM updates, summaries, notifications, analytics or follow-up tasks can happen after the conversation ends.
A production AI voice agent is best understood as a realtime distributed system—not as one model with a realistic voice.

The two main AI voice-agent architectures

Architecture 1

Cascaded voice architecture

A cascaded system explicitly separates speech recognition, reasoning and speech generation. This gives engineers strong control over transcripts, model inputs, tools and TTS output.

Architecture 2

Realtime audio-native architecture

An audio-native realtime model can process live audio and produce spoken output without requiring the whole interaction to pass through a mandatory text intermediary.

Cascaded architecture

Typical cascaded voice-agent flow
Caller Audio
↓
Voice Activity / End-of-Turn Detection
↓
Streaming Speech-to-Text
↓
Transcript
↓
LLM / Agent Orchestrator
↓
Knowledge / Business Rules / Tools
↓
Text Response
↓
Streaming Text-to-Speech
↓
Caller Hears Response

Cascaded architecture should not be dismissed as “old voice AI.” Modern implementations can stream and pipeline stages instead of waiting for every stage to fully finish before the next begins.

Its biggest advantage is modularity and observability. Engineers can inspect what the speech recognizer produced, what text reached the model, which tool was called, what the tool returned and what response was passed into TTS.

That makes cascaded systems especially useful when predictable workflows, existing text-based agents, auditability or component-level optimization matter.

Realtime speech-to-speech / audio-native architecture

Conceptual audio-native flow
Caller Audio
↓
Realtime Multimodal / Audio Model
↕
Conversation State + Tools + Business Logic
↓
Generated Audio

In this architecture, the main model can work directly with audio input and output. That means the system may preserve more acoustic information such as timing, stress, rhythm, intonation, hesitation and emphasis instead of flattening every turn into text first.

Important distinction Speech-to-speech, audio-native and full-duplex are not synonyms. A system may accept and return audio without using one monolithic native-audio model underneath. Likewise, barge-in support does not automatically mean the system continuously models overlapping speech like a research-grade full-duplex architecture.
Requirement Cascaded Audio-native realtime
Component-level debugging Usually easier Can be more abstract
Explicit transcript control Strong May be optional or secondary
Existing text-agent integration Excellent fit May require redesign
Component swapping Flexible More model-dependent
Acoustic information Partly reduced through text Can preserve more audio information
Tool calling Supported Supported
Auditability Usually straightforward May require more telemetry
Low-latency potential Strong with streaming Strong architectural potential
Do not overgeneralize: Audio-native does not automatically mean faster, better or more reliable. Network routing, turn detection, tools, buffering, model choice and implementation quality can dominate real user experience.

The production AI voice-agent stack

A more defensible production architecture
Caller / Browser / Mobile App
↓
Telephony & Media Ingress
PSTN / SIP / WebRTC / WebSocket
↓
Audio Transport & Handling
codec / resampling / jitter / buffering
↓
Conversation Timing
VAD / EOT / semantic turns / interruption
↓
Understanding & Reasoning
STT + LLM or audio-native model
↓
Knowledge + Business Logic
RAG / rules / state / APIs
↓
Action Plane
CRM / Calendar / Database / Webhooks / Workflows
↓
Speech Generation
↓
Caller Hears Response

Conversation plane vs action plane

One of the most useful ways to understand production voice AI is to separate what the system decides from what the system actually changes.

Conversation plane Understand intent, ask questions, maintain context, decide whether a tool is needed and formulate the next response.
Action plane Read or write real data through authorized calendars, CRMs, databases, APIs, webhooks and workflow systems.

How does a phone call reach the AI?

For a phone-based agent, the process usually begins before any AI model receives the audio.

Phone Number
↓
Carrier / PSTN
↓
Call Routing / SIP Signaling
↓
Realtime Media Session
↓
Voice-Agent System

SIP is not the audio stream

SIP—Session Initiation Protocol—is primarily a signaling and session-control protocol. It is used to establish, modify and terminate communication sessions.

Realtime audio is typically transported separately through media protocols and media sessions. That distinction matters because telephony signaling and audio transport are different engineering layers.

SIP manages the session. Media transport carries the voice.

WebRTC and WebSockets

Not every voice agent uses a phone number. Browser or mobile voice experiences may use WebRTC, while server-based applications may exchange realtime audio over bidirectional WebSocket connections.

Audio is not transmitted as words

Before an AI system understands a sentence, it receives audio frames. Those frames may need to be decoded, resampled, buffered or re-encoded depending on the telephony provider, codec, model interface and network path.

Incoming Audio Frames
↓
Decode
↓
Resample if Necessary
↓
Model Processing
↓
Resample / Encode
↓
Playback to Caller

Different interfaces support different codecs and sample rates. Claims such as “all AI phone calls use one specific codec or sample rate” should therefore be treated as provider-specific, not universal.

Jitter and buffering

Realtime audio packets do not always arrive at perfectly regular intervals. Variation in arrival timing is called jitter.

Buffers can smooth playback, but they introduce a trade-off: more buffering may improve stability while also increasing delay.

How does the agent know when you have finished speaking?

This is one of the hardest problems in natural voice interaction.

Speech
Speech
Speech
Silence
Silence
Threshold reached
→ End of turn

The simplest systems rely heavily on silence and Voice Activity Detection. But silence does not always mean the speaker is finished.

Consider: “I need an appointment for... uh... probably Tuesday.”

A fixed silence threshold can answer too early and interrupt the caller. More advanced systems may combine acoustic signals with linguistic or semantic information to estimate whether the thought is actually complete.

Voice-agent latency is partly a speed problem—and partly a conversation-intelligence problem.

How cascaded systems understand speech

Streaming speech recognition often produces intermediate hypotheses instead of waiting for a full sentence.

"I need..."
"I need an app..."
"I need an appointment..."
"I need an appointment Tuesday."

Earlier partial results may change as more audio arrives. Eventually the recognizer returns a stable or finalized transcript.

That distinction matters for names, addresses, phone numbers, dates, account numbers and appointment times. A production system should be cautious about irreversible actions based on unstable partial transcription.

The transcript paradox in audio-native systems

In a cascaded system, the transcript is normally the explicit text representation passed into the reasoning stage. In some audio-native systems, the architecture can be different:

Caller Audio
↙      ↘
Audio Model Interpretation
Separate ASR Transcript
Key technical consequence The visible transcript is not necessarily the exact internal representation the audio-native model used to understand the caller.

That means transcript accuracy alone may not reveal whether the agent understood the correct entity, selected the correct tool or completed the right business outcome.

What does the reasoning layer actually do?

Depending on the architecture, the reasoning layer may determine:

  • what the caller wants;
  • what information is missing;
  • whether to ask a clarification question;
  • whether approved company knowledge is needed;
  • whether a tool or external system should be called;
  • which tool and arguments should be used;
  • whether the requested action is permitted;
  • whether the caller should be transferred;
  • what the agent should say next.

A strong production design usually separates probabilistic model reasoning from deterministic business rules and authoritative external data.

Type of information Example
Model reasoning The caller appears to want a cleaning next Tuesday afternoon.
Business rule This service cannot be booked less than 24 hours in advance.
External truth The calendar API says 3:30 PM is available.

Prompt context vs RAG vs live business data

Mechanism Best suited for
Prompt / context Small, stable instructions and facts
RAG / knowledge retrieval Large collections of documents, manuals, policies and FAQs
Live tools / APIs Current or authoritative data such as calendar availability, CRM records or order status
Knowledge answers questions. Tools inspect or change the real world.

Retrieval-Augmented Generation can improve grounding by supplying relevant information from a knowledge base, but it should not be described as a guarantee that hallucinations cannot happen.

How tool calling turns conversation into action

Tool calling is what allows a voice agent to move beyond conversation.

Caller:
"Can you book me Tuesday at 3?"

        ↓

Model requests:
get_availability(
  service="consultation",
  date="Tuesday"
)

        ↓

Application / Tool Layer:
queries calendar

        ↓

Tool result:
2:30 PM
3:00 PM
4:30 PM

        ↓

Agent:
"Yes, 3 PM is available.
Would you like me to book it?"

        ↓

Caller:
"Yes."

        ↓

Model requests:
create_booking(...)

        ↓

Application:
creates appointment

        ↓

Authoritative result:
booking_id = ABC123

        ↓

Agent:
"You're booked for Tuesday at 3 PM."
The model requests or proposes the action. Authorized software executes it.

End-to-end example: booking an appointment

1
Caller: “Hi, I need a cleaning next Tuesday afternoon.”
2
Understanding: intent = booking, service = cleaning, date = next Tuesday, preference = afternoon.
3
Business rules: service duration, provider eligibility and scheduling restrictions are checked.
4
Read tool: available appointment slots are requested from the scheduling system.
5
Agent: offers only the slots returned by the authoritative calendar.
6
Caller: chooses 3:30 PM.
7
Confirmation boundary: the exact date, time and service are repeated before a write operation.
8
Write tool: the booking request is sent to the appointment system.
9
Authoritative response: the appointment system confirms success.
10
Post-call: CRM updates, summaries or follow-up workflows may run.

Read tools and write tools should not be treated equally

Action Example Typical control
Basic read Check opening hours Low friction
Live read Check appointment availability Validation
Sensitive read Retrieve customer record Authentication + authorization
Reversible write Add CRM note Validation + logging
Customer-visible write Create appointment Explicit confirmation
Sensitive transaction Payment or refund Strong authorization
Destructive action Delete or cancel important record Confirmation and possibly human approval
Structured output is not the same as safe execution. A tool call can be perfectly valid JSON and still target the wrong customer, wrong appointment or wrong account. Schema validation and business validation are different problems.

How does the AI speak back?

In a cascaded architecture, generated text is passed to a TTS system. Modern TTS can stream audio before the entire response has been synthesized.

But TTS quality is not only about whether the voice sounds realistic. Real production tests should include:

  • names and surnames;
  • phone numbers;
  • addresses;
  • currencies;
  • dates and appointment times;
  • acronyms;
  • domain-specific terminology;
  • language switching;
  • speaking rate and pauses.

Where AI voice-agent latency actually comes from

There is no single component called “voice latency.” A spoken response may depend on several stages.

Illustrative latency waterfall — not to scale
End-of-turn detection
STT finalization
Model inference
Retrieval / tool call
TTS first audio
Network / buffering
Total user-perceived delay
Metric What it measures
End-of-turn latency How long the system takes to decide the caller has finished speaking
STT latency Time to obtain usable speech recognition
TTFT Time to the model’s first text token
Tool latency Time spent waiting for an external business system
TTS latency Time until audio generation begins
TTFA Time until the caller actually begins hearing the response
End-to-end turn latency Total user-perceived delay from end of user turn to audible response
Do not invent a universal “human-like” threshold. Vendor dashboards, model benchmarks and academic papers may publish useful numbers, but those measurements belong to specific systems and conditions.

What happens when the caller interrupts the AI?

Barge-in is often described as “the AI stops talking when the user speaks.” That is only part of the problem.

AI Audio Playing
↓
Caller Speech Detected
↓
Stop / Cancel Current Generation
↓
Clear Queued Playback
↓
Determine What Caller Actually Heard
↓
Accept New Caller Turn
↓
Reconcile Conversation State
↓
Generate New Response

The key hidden problem is playback-state reconciliation. The server may have generated more text than the caller actually heard before interrupting. If conversation history assumes the whole response was delivered, the system state can become inconsistent with reality.

What happens when something goes wrong?

Production systems should be designed around failure paths, not just successful demos.

Failure Unsafe behavior Safer production behavior
Name or number unclear Guess Ask the caller to repeat or confirm
Caller silent Wait indefinitely Reprompt, then exit gracefully
Question outside scope Invent an answer Retrieve, explain limitation or transfer
Weak retrieval evidence Fill in missing information Clarify or escalate
Calendar API unavailable Claim booking succeeded Explain failure and offer fallback
No availability Invent a slot Offer only actual alternatives
Write request times out Retry blindly Check transaction state and use idempotent recovery where possible
Human transfer unanswered Leave caller stranded Fallback route, callback or voicemail policy
Connection drops Repeat irreversible actions Recover state safely

The duplicate-write problem is especially important. If a booking API succeeds but the response is lost in a network timeout, blindly retrying the same action can create two appointments.

Many voice-agent failures are not “AI intelligence” problems. They are distributed-systems, permissions, telephony or workflow-reliability problems.

How does human handoff work?

Human handoff contains at least three separate design questions:

  1. Trigger: Why should the call be transferred?
  2. Telephony: Where should the live call be routed?
  3. Context: What information should the human receive?

Common transfer triggers include explicit caller requests, repeated misunderstanding, sensitive operations, unsupported requests, tool failures or policy-defined escalation.

There is also a terminology difference between blind/cold transfer and attended/warm transfer. A system should not call a transfer “warm” unless the telephony behavior genuinely includes attended-transfer semantics.

What happens after an AI voice call?

Call Ends
↓
Transcript / Call Data
↓
Summary
↓
Structured Extraction
↓
Call Outcome
↓
CRM / Follow-Up Workflow
↓
Analytics / Evaluation
{
  "intent": "appointment_booking",
  "appointment_booked": true,
  "appointment_time": "...",
  "human_handoff": false,
  "follow_up_required": true
}
Schema-valid does not mean factually correct. Important business outcomes should be derived from authoritative tool events whenever possible—not only from a language-model summary.

How production voice agents are monitored

Reading transcripts is useful, but it is not enough. A production system may track:

  • call/session ID;
  • speech-start and speech-end events;
  • end-of-turn decisions;
  • STT interim and final events;
  • model request timing;
  • retrieval requests and results;
  • tool names, arguments and outcomes;
  • TTS start and first-audio timing;
  • interruptions and cancelled playback;
  • human-transfer attempts;
  • errors and connection events;
  • business outcomes.

Percentile analysis matters too. A low average latency can hide a small but important group of calls with very slow tail performance.

How should AI voice agents be tested?

Test layer What to test
Deterministic tool tests Correct parameters, authentication, duplicate-write prevention, timeout handling
Text conversation tests Intent, policy, tool selection, escalation behavior
Audio tests Pauses, interruptions, accents, names, numbers, noise, language switching
Failure injection Calendar errors, CRM timeouts, unavailable transfer destinations
Adversarial testing Unauthorized data requests, prompt-injection attempts, malicious tool inputs
Regression testing Critical scenarios re-run after model, prompt, tool or workflow changes
A voice agent should be tested as both a conversation system and a business transaction system.

Security: the caller is untrusted input

Voice does not remove AI-agent security risks. A caller can still attempt to override instructions, access unauthorized information or trigger unsafe actions.

Model
↓
Tool Gateway
Authentication
Authorization
Schema Validation
Business-Rule Validation
Least Privilege
Confirmation / Approval
Audit Logging
↓
CRM / Calendar / Database

Recording, transcription, PII and retention requirements depend on jurisdiction and business context, so those questions should be treated separately from the technical architecture.

Common misconceptions about AI voice agents

“It is just ChatGPT connected to a phone.”
Telephony, media transport, turn detection, tools, security, orchestration and observability are separate engineering layers.
“Every AI voice agent uses STT → LLM → TTS.”
Cascaded and audio-native speech-to-speech systems both exist.
“If an API accepts audio and returns audio, it must be one native model.”
A unified API can still orchestrate multiple underlying speech and language systems.
“Audio-native means full duplex.”
Native audio processing and continuous overlapping conversational modeling are different properties.
“The transcript is exactly what the model understood.”
In some audio-native systems, transcription may be a separate observability process from the model’s audio interpretation.
“The model books the appointment.”
The model typically selects or requests a tool; external software performs the real booking and returns the result.
“RAG prevents hallucinations.”
RAG can improve grounding, but it is not an absolute guarantee of factual correctness.
“A realistic voice means the system is reliable.”
Voice quality and correct business execution are separate dimensions.

Does an AI voice agent use ChatGPT?

Not necessarily. “AI voice agent” describes a category of systems, not a single model or vendor.

A voice agent may use a text-based language model behind STT and TTS, a realtime multimodal model, a specialized speech model, deterministic workflow logic or multiple models across different stages.

How does an AI voice agent connect to a CRM?

Usually through a controlled integration layer using APIs, function calling, webhooks, workflow automation, database connectors or integration platforms.

The model should not be assumed to “know” whatever exists in the CRM. The application must retrieve the relevant data and enforce appropriate permissions.

Why do AI voice agents have latency?

Because a spoken answer may depend on network transport, turn detection, speech recognition, reasoning, retrieval, tools, TTS, buffering and playback.

Optimizing one benchmark—such as model TTFT—does not automatically make the complete phone conversation fast.

What happens if the agent does not know the answer?

There is no universal fallback. A production system should define one explicitly.

Depending on the workflow, the agent may:

  • search an approved knowledge source;
  • ask a clarification question;
  • say that the information is unavailable;
  • call an authoritative external system;
  • take a message;
  • transfer the conversation to a human.

Generating an unsupported answer should not be the fallback strategy.

The production definition

A production AI voice agent is a realtime distributed system in which conversation, telephony, business logic and external tools have to succeed together.

Frequently asked questions

How do AI voice agents work?

They connect a live audio channel to a conversation system that detects speech turns, understands the request, reasons about what to do, uses knowledge or business tools when needed, and returns spoken audio.

Do all AI voice agents use STT, LLM and TTS?

No. Cascaded systems do, but audio-native realtime systems can process and generate audio more directly.

How does an AI voice agent know when someone stopped speaking?

Systems may use silence detection, VAD, acoustic endpointing, semantic end-of-turn prediction or a combination of these methods.

How does an AI voice agent book an appointment?

It identifies the booking intent, gathers missing information, checks live availability through a tool, confirms the caller’s choice, requests the write action, waits for success, and then confirms the booking.

How do AI voice agents handle interruptions?

A system may detect caller speech, stop current generation, clear queued audio, reconcile what was actually heard, accept the new turn and continue from the updated conversation state.

Why do AI voice agents have latency?

Delay can come from network transport, turn detection, transcription, model inference, retrieval, tool execution, speech generation, buffering and playback.

Does an AI voice agent automatically know my CRM?

No. CRM information has to be provided through context, retrieval or an authorized integration.

What happens after an AI voice call?

A system may generate a transcript, summary, structured outcome, CRM update, follow-up workflow and analytics event after the live conversation ends.

Want to understand the category before choosing a voice-agent setup?

Start with the broader guide to what an AI voice agent is, then use this article as the technical architecture reference.

Read: What Is an AI Voice Agent? →

Technical sources & research basis

This guide was built from primary documentation, standards and technical research covering production voice-agent architecture, realtime audio, tool calling, telephony, testing, observability and security. Sources were reviewed in August 2026.

Tags
AI Voice Agent Voice AI Speech-to-Text Realtime Speech LLM Text-to-Speech Telephony Tool Calling RAG SIP