Nexolve

Architecture · Voice

Voice AI Agent Architecture: From Phone Call To Spoken Reply

The short answer

A voice AI agent is a streaming pipeline. Audio arrives over the phone network or WebRTC, a media server carries it to voice activity detection and streaming speech-to-text, a language model decides what to say and which tools to call, and streaming text-to-speech speaks the reply. The alternative is a speech-to-speech model that hears and speaks directly. Either way, the design goal is a reply that starts within about a second.

By Maitreya Kulkarni · Updated · 11 min read

01 · The architecture

How Does Audio Flow Through A Voice Agent?

Through a loop of streaming stages. The media server receives the caller's audio, turn detection and speech-to-text work on it as it arrives, the dialogue agent responds and calls tools, text-to-speech streams the voice back through the media server, and interruptions cut the loop short.

NX-AR-03 · Architecture

The cascaded voice pipeline

  • Outside world
  • Data & integration
  • AI agent
  • System of record
  • Your people
  1. L1

    Caller

    (Outside world)
    • Phone call

      PSTN or SIP trunk

      . Hands work to: Media server.
    • Browser or app

      WebRTC

      . Hands work to: Media server.
  2. L2

    Transport

    (Data & integration)
    • Media server

      Rooms, codecs, jitter buffers

      . Hands work to: Turn detection, Speech-to-text.
  3. L3

    Hearing

    (Data & integration)
    • Turn detection

      Voice activity, end of turn, barge-in

      . Hands work to: Dialogue agent.
    • Speech-to-text

      Partial and final transcripts

      . Hands work to: Dialogue agent.
  4. L4

    Thinking

    (AI agent)
    • Dialogue agent

      LLM with the call playbook

      . Hands work to: Tool calls, Text-to-speech.
  5. L5

    Acting

    (AI agent)
    • Tool calls

      Calendar, CRM, knowledge

      . Hands work to: Warm transfer.
    • Text-to-speech

      Streams sentence by sentence

      . Hands work to: Audio out.
  6. L6

    Outcome

    (System of record)
    • Warm transfer

      To a person, with a summary

    • Audio out

      Back to the caller

      . Hands work to: Media server.
    • Transcript and recording

No stage waits for the previous one to finish: transcripts stream into the model, the model's first sentence streams into speech, and audio plays while the rest is still being generated.

02 · Two approaches

What Are The Two Ways To Build A Voice Agent?

A cascaded pipeline chains separate speech-to-text, language and text-to-speech models. A speech-to-speech model, such as OpenAI's Realtime models or Gemini Live, takes audio in and produces audio out. Cascades give more control; speech-to-speech gives lower latency and more natural prosody.

Cascaded pipeline versus speech-to-speech
LatencyCascaded (STT → LLM → TTS)Low with streaming; more hopsSpeech-to-speechLowest; one model
ControlCascaded (STT → LLM → TTS)Swap any stage; inspect textSpeech-to-speechLess visibility into each step
VoicesCascaded (STT → LLM → TTS)Any TTS voice, cloningSpeech-to-speechThe model's voices
Tool useCascaded (STT → LLM → TTS)Mature, any LLMSpeech-to-speechSupported, model-dependent
Best forCascaded (STT → LLM → TTS)Regulated, tool-heavy callsSpeech-to-speechNatural, fast conversation

03 · Latency

Where Does The Latency Go In A Voice Agent?

Into every hop: telephony, deciding the caller has finished, final transcription, the model's first token, and the first audio from speech synthesis. People notice pauses beyond about a second, so each stage is streamed and tuned.

01

Turn detection

Waiting for silence is slow; semantic end-of-turn models decide sooner whether the caller has finished a thought.

02

Fast first token

A fast model, a short system prompt and prompt caching shorten the wait for the first words.

03

Streaming speech

Text-to-speech starts on the first sentence while the model is still writing the rest.

04

Location

Running media, models and telephony in the same region removes hundreds of milliseconds of travel.

04 · Turn-taking

How Do Interruptions And Turn-Taking Work?

The agent listens while it speaks. When voice activity detection hears the caller start talking, the agent stops its speech, drops what it was about to say and treats the new words as the next turn, just as a person would.

01

Barge-in

Speech output is cancelled the moment the caller speaks, so they never have to wait for the agent to finish.

02

Backchannels

Short sounds like “mm-hm” are recognised as listening, not as a new turn.

03

Filler while working

When a tool takes time, the agent says something natural (“let me check that”) instead of going silent.

05 · Production

What Does It Take To Run Voice Agents In Production?

Everything a call centre needs, plus AI-specific checks: consent and disclosure, recordings and transcripts, quality sampling, dashboards, and compliance with calling rules in each country.

01

Disclosure and consent

Callers are told they are speaking to an automated agent, and recording consent is handled per jurisdiction.

02

Calling rules

Outbound calls respect do-not-call registries such as India's DND and the TCPA in the US, and calling hours.

03

Quality assurance

Every call is transcribed and scored; a sample and every flagged call is reviewed by a person.

04

Hand-off

Warm transfer to a person with a summary on screen, so callers never repeat themselves.

The ecosystem

  • Twilio
  • LiveKit
  • Deepgram
  • ElevenLabs
  • OpenAI Realtime
  • Gemini Live
  • WebRTC

Build it with us

We Build This For Real Businesses.

The services where this architecture does the work, designed, built and handed over by Nexolve.

FAQ

Questions About Voice Agent Architecture.

Still unsure about something? Ask us

Conversations feel natural when replies start within about a second. Well-built pipelines get there by streaming every stage and keeping all components in the same region.

Yes. Current speech models handle many accents and languages, including callers who switch languages mid-sentence. Testing with real callers before launch matters more than the model's spec sheet.

Neither is better everywhere. Speech-to-speech is faster and more natural; a cascade offers more control, any voice, and easier auditing of exactly what was said and why.

Yes, through tool calls into calendars and CRMs while the caller is on the line, usually reading the details back for confirmation before committing.

Contact

Want This Architecture Built For You?

A 20-minute call. We'll listen to the problem, tell you honestly whether we're the right team for it, and outline what the build would look like.

  1. 01Tell us the problemA 20-minute call. Rough is fine.
  2. 02Get a scoped planWhat we'd build and what it takes, within 48 hours.
  3. 03Start on your timelineOnce the scope is signed off, we build in milestones.