Blogs
/
How Real-Time Voice AI Actually Works (STT → LLM → TTS, Explained)

How Real-Time Voice AI Actually Works (STT → LLM → TTS, Explained)

Retell
AI Voice Agent Platform
Published 
May 11, 2026
Reviewed 
November 25, 2026
17
 min read
How Real-Time Voice AI Actually Works (STT → LLM → TTS, Explained)
About this article
How real-time voice AI works: the STT, LLM and TTS pipeline, turn-taking, barge-in, where latency goes, and how speech-to-speech models differ.
BACK TO BLOGS
See Retell AI in action
Start free
Back to top

Real-time voice AI is software that holds a spoken conversation and replies fast enough that it feels like a phone call with a person. Most production voice agents do this with a chained pipeline: speech-to-text (STT) turns the caller's audio into text, a large language model (LLM) decides what to say or do, and text-to-speech (TTS) turns the reply back into audio.

Two controls sit around that pipeline. Turn-taking decides when the caller has finished speaking. Barge-in handling stops the agent when the caller interrupts. A second design, speech-to-speech, replaces the three stages with one model that takes audio in and returns audio out.

If you want the definition first, start with what an AI voice agent is. For the same pipeline traced through a full phone call, see how AI voice agents work on a call.

Key takeaways

  • Real-time voice AI is a three-stage pipeline with two controls around it. Audio comes in, speech-to-text turns it into words, an LLM decides what to do, and text-to-speech turns the reply back into audio. Turn-taking and barge-in handling wrap all of it.
  • Streaming is what makes it real time. Each stage starts emitting output before the previous stage has finished. LiveKit's architecture guide puts a non-streaming pipeline at 2 to 4 seconds of response delay and a fully streaming one under 1 second.
  • The bar is set by human conversation. People leave gaps of roughly 200 ms between turns, so every stage of latency is audible.
  • Most of the delay you can control sits in two places: the wait to decide the caller has finished, and the LLM's time to first token. If a build feels slow, look there first.
  • Speech-to-speech models skip the text stages. One model hears audio and answers in audio. You give up some control over each stage in exchange for a simpler loop.
  • The 2026 stacks all look similar architecturally. What separates production from demo is orchestration quality: VAD tuning, turn-taking, interruption handling and function-call latency.

What STT, LLM and TTS mean

STT, LLM and TTS are the three models in a voice agent, in the order a caller's words pass through them. The other terms in the table are the controls and measurements that come up whenever people discuss the pipeline.

TermStands forWhat it does on a call
STT (also called ASR)Speech-to-text, or automatic speech recognitionTurns the caller's audio into text, live, while they are still speaking
LLMLarge language modelReads the transcript, the prompt and the conversation so far, then writes a reply or calls a function
TTSText-to-speechTurns the LLM's text into spoken audio
VADVoice activity detectionLabels each slice of incoming audio as speech or not speech
Turn-taking (also end-of-turn detection or endpointing)Decides when the caller has finished a thought so the agent can answer
Barge-inStops the agent's audio when the caller interrupts
TTFTTime to first tokenHow long the LLM takes to start producing its reply
Speech-to-speech (S2S)A single model that takes audio in and returns audio out, in place of the three separate stages

STT and TTS are opposites. STT listens and TTS speaks. Neither one decides what to say. That is the LLM's job, which is why the three are written in order as STT, LLM, TTS.

How a real-time voice agent handles one turn

A voice agent runs the same loop on every turn of a call. The caller says "Hi, I'd like to book a cleaning for next Tuesday afternoon," and a moment later the agent replies. Seven things happen in between.

1. Audio comes in over the phone

The call reaches the telephony layer first. Phone calls arrive over SIP, and browser or in-app calls usually arrive over WebRTC. Either way, the caller's audio shows up as a stream of small packets. The RTP standard sets the default packet length at 20 ms of audio.

Phone audio is also lower quality than a laptop microphone. Twilio's media streams, for example, always deliver 8,000 Hz mu-law audio, so every later stage has to work with a narrow signal. Our post on SIP and WebRTC gateways for voice AI covers this layer in detail.

2. Voice activity detection (VAD)

VAD is the lightweight model that decides whether the incoming audio is speech or silence. It runs on every chunk. The open-source Silero VAD, for example, processes one audio chunk of 30 ms or more in less than 1 ms on a single CPU thread.

VAD matters for two reasons. You do not want to send silence to your STT, because it wastes compute and confuses turn-taking. VAD is also the first signal turn-taking uses to decide the caller has stopped. Tune it too tight and you cut the caller off mid-word. Tune it too loose and the agent feels sluggish. VAD only says whether someone is speaking. Whether they have finished is a separate question, covered in VAD vs turn-taking endpointing.

3. Speech-to-text streams partial transcripts

As soon as VAD reports speech, the audio is piped into a streaming STT engine. The key word is streaming. The STT does not wait for the caller to finish. It emits partial transcripts, which are incomplete guesses that get revised as more audio arrives. Deepgram's docs call these interim results: preliminary results sent during the stream, followed by a final transcript once the model is confident.

So partway through the sentence the transcript might read "Hi I'd like to book a." A moment later, "Hi I'd like to book a cleaning for." Then the full sentence.

Many homemade builds fail here. A "transcribe this audio file" API does not give you streaming, partials or end-of-utterance detection. Our comparison of the best speech-to-text models shows which ones ship streaming and turn detection. The hard part of recognition is accuracy across accents and languages, which is why multilingual speech-to-text has become its own specialization.

4. Turn-taking decides the caller is done

Turn-taking is the decision that the caller has finished a thought, so the agent can respond. A fixed silence timer is the simple version. Deepgram's endpointing, for example, is on by default at 10 ms of silence and can be set to any value, and the example configuration in OpenAI's Realtime docs waits for 500 ms of silence.

A timer alone does not work well, because humans pause mid-sentence, take breaths, and say "um" while they think. A short timer cuts them off ("Hi, I'd like to book," "OK, what would you like to book?"). A long one makes every reply feel slow.

Production stacks add a model that reads meaning as well as silence. OpenAI's semantic VAD uses a classifier to score whether the user has finished speaking, based on the words they have said. LiveKit's turn detector adds conversational context on top of VAD, and LiveKit lists the per-turn inference time of its text model at about 50 to 160 ms. Retell's turn-taking model handles backchannels ("mm-hmm," "right"), hesitation pauses, and end-of-utterance detection inside a tight end-to-end response budget. See how Retell's turn-taking model works.

Most of the difference between "feels human" and "feels robotic" lives in this stage. For what it looks like when it goes wrong, read turn-taking in voice AI: the hidden problem that breaks most demos.

5. The LLM picks what to do

Once the caller's turn is over, the language model is called with everything it needs: your system prompt, the full conversation transcript, any retrieved knowledge from your knowledge base, and the list of available functions, which are the tools the agent can call. The model has two choices on every turn. It generates a spoken reply, or it calls a tool (book the appointment, transfer the call, look up the customer record).

The latency metric that matters here is time to first token (TTFT): how long until the first word starts streaming, not how long the full reply takes. LiveKit's published target for this stage is 200 to 400 ms, depending on model size and infrastructure. Once tokens start streaming, the TTS stage begins before the model has finished writing. (Pricing details on the LLM tier.)

Function calling follows a fixed sequence. The model returns a function call with structured arguments instead of a reply. The application runs it. The result goes back to the model, which then writes the answer the caller hears. On a voice agent that usually means a round-trip to your webhook (booking the slot in Cal.com, writing the lead into Salesforce). When the API behind it is slow, the agent typically says something like "one moment while I check that" to fill the gap. (Booking, transferring, knowledge base.)

Reasoning during the reply

TTFT gets harder to hold once a model reasons. A think-first model finishes its reasoning before the first word, so every extra step of thinking is silence on the line.

An interleaved model changes the order. It writes the first sentence of its reply right away, reasons silently while that sentence is playing, then continues the reply from what it worked out. The reasoning is never spoken.

Tell-1, Retell's own LLM, is built this way. The Retell LLM technical post explains how it is trained and served, and names the trade-off: speaking sooner means committing to the opening before any reasoning has happened. For speed, the Retell vCX Benchmark listed Tell-1 at a P50 time to first sentence of 76 ms over live traffic (read November 13, 2026). That is model time, before network, STT and TTS are added, and it is a later mark than time to first token.

6. Text-to-speech streams audio back

As soon as the LLM emits its first few tokens, TTS starts. The audio is streamed out in chunks, so the caller hears the first word before the full reply has been generated.

TTS vendors publish how quickly their fast models produce first audio. ElevenLabs lists Flash v2.5 at about 100 ms (median, excluding application and network latency), and Cartesia advertises first audio in under 90 ms for Sonic (both as of November 2026). Higher-fidelity models cost time: ElevenLabs says its Multilingual v2 model has higher latency than its Flash models.

The 2026 voice menu has three tiers: Retell platform voices and Cartesia for fast, natural, low-latency at $0.015/min; ElevenLabs for highest-fidelity brand voices; and a long tail of voice clones for premium use cases.

Live TTS tools also expose controls over how the voice sounds. ElevenLabs has settings for stability, similarity, style and speed, plus pronunciation dictionaries. Cartesia's Sonic takes a speed value from 0.6 to 1.5, a volume value from 0.5 to 2.0, and an emotion setting that is in beta. Some tools also accept SSML tags for pauses and emphasis.

7. Barge-in handling for interruptions

The pipeline above works until the caller does what humans do: interrupt. Maybe they realized they meant Wednesday, not Tuesday. Maybe they are irritated. Either way, the agent has to stop talking, drop the rest of its planned reply, and start listening again.

A naive build keeps reading out the rest of the TTS audio while the caller is talking. A good build cuts the audio, discards whatever the LLM was going to say, and starts transcribing the caller's new audio. It also records what was actually spoken before the cutoff, so the model does not repeat itself or assume the caller heard something they did not.

Not every sound is an interruption. A caller who says "uh-huh" while the agent is speaking usually wants it to continue. Our post on how voice AI handles the hardest parts of a real call covers how agents tell the two apart.

Where the latency goes

The delay a caller hears is the sum of every stage between the end of their sentence and the first sound of the reply. In human conversation the gap between turns is short, on the order of 200 ms according to a 2015 review by Levinson and Torreira in Frontiers in Psychology. A voice agent that takes several times longer feels slow even when every answer is correct.

LiveKit, which maintains an open-source framework for voice agents, publishes these targets for a streaming pipeline (read November 2026):

StageTarget latency (LiveKit)What moves it
Audio transportUnder 50 msNetwork path and geography
STT, first partial result100 to 200 msStreaming STT
LLM time to first token200 to 400 msModel size and infrastructure
TTS time to first audio100 to 300 msStreaming synthesis
Total, as the caller perceives itUnder 1 secondHow much the stages overlap

Two things are missing from that table. The first is the turn-taking wait: the time the agent spends making sure the caller has finished. With a fixed 500 ms silence timer, that is half a second before any model has started work. The second is function calls, which add the response time of whatever API they hit.

Other published numbers sit in the same range. Pipecat's documentation says typical voice interactions complete in 500 to 800 ms. LiveKit says a sequential pipeline, where each stage waits for the previous one to finish, often produces 2 to 4 seconds of response delay.

Retell puts the line here: the whole pipeline has to finish in under ~700ms or it stops feeling human. Above that threshold callers get awkward, repeat themselves, and hang up. Retell's stack is built to stay under that line. Our older post on why low latency matters explains the effect on callers.

How to keep a real-time voice agent fast

  • Stream every stage. Partial transcripts go to the LLM, tokens go to TTS, and audio goes to the caller as it is produced. No stage waits for the previous one to finish.
  • Replace the fixed silence timer. A turn-taking model that reads the words can answer quickly after a finished sentence and wait through a mid-sentence pause.
  • Choose the LLM by time to first token. Model choice and prompt size both move TTFT. Our guide to which LLM should power your voice AI agent compares the options.
  • Use a fast TTS model for live calls. Keep the highest-fidelity voices for cases where the brand voice matters more than the response time.
  • Cover slow function calls. Have the agent say it is checking, and keep the APIs behind your functions fast.
  • Measure on real calls. Vendor figures exclude network and telephony time. Judge the stack on the delay a caller hears.

Chained pipeline vs speech-to-speech

A speech-to-speech model replaces the three stages with one model that takes audio in and returns audio out. OpenAI's Realtime API is one example: its docs say the model works directly with audio, maintains conversation state, and can call tools. A chained pipeline keeps STT, LLM and TTS as separate parts with text passing between them.

OpenAI documents both designs and describes the choice like this: the Realtime API gives you speech, reasoning and tool use in one session, and the chained pipeline gives you control over each speech and text stage.

QuestionChained STT, LLM, TTS pipelineSpeech-to-speech model
How it worksThree models run as separate streaming stagesOne model takes audio in and returns audio out
Text between stagesYes. You can inspect or transform the intermediate textThe model works directly with audio
Swapping partsEach component can be replaced independentlySpeech, reasoning and tool use come from one model
Latency (LiveKit's figures)Under 1 second is possible with streaming at all three stagesCan get under 500 ms
How the voice soundsSet by the TTS model and its controlsMore natural prosody, because the model operates directly on audio (LiveKit)
Main trade-offMore parts to coordinate: VAD, turn-taking, cancellation, stateLess control over the individual components and, depending on the provider, higher cost per token (LiveKit)
When OpenAI recommends itWhen each stage needs to be visible or replaceable, for example to store the transcript or run policy checks before the agent speaksWhen you want one model to interpret audio, decide what to do, and respond in speech

There is also a third pattern. OpenAI's GPT-Live can listen and speak at the same time, which OpenAI calls full duplex. The live model handles the spoken interaction and delegates reasoning and tool use to a separate backend. Our post on how GPT-Live-1 works on phone calls covers it.

For a side-by-side of the current models, see our comparison of speech-to-speech AI APIs for phone calls. To see one of these models on a real phone line, read how to run a phone agent on Grok Voice.

What the orchestration layer does

The orchestration layer is the software that runs the call around the models. STT, the LLM and TTS are each a single API. Orchestration is everything that makes them behave like one conversation partner:

  • Moving audio between the phone network and the models, in both directions, without gaps.
  • Running VAD and turn-taking, and deciding when the agent may speak.
  • Passing partial output from each stage to the next so the stages overlap.
  • Cancelling TTS and the pending LLM reply when the caller interrupts.
  • Routing function calls, handling their failures, and filling the silence while they run.
  • Keeping the conversation state equal to what the caller actually heard.

Swapping one STT or TTS vendor for another is a contained change. Replacing the orchestration means rewriting much of the system.

Build the stack yourself or use a platform

There are three ways to get a working pipeline:

  • Assemble it yourself. Open-source frameworks such as LiveKit Agents and Pipecat supply the pipeline, and you pick the STT, LLM and TTS vendors. You own telephony, tuning, monitoring and on-call.
  • Use a speech-to-speech API. One model replaces the three stages. You still build the phone connection, transfers and logging around it.
  • Use an AI voice agent platform. The pipeline, telephony and orchestration come as one product, and your work goes into the prompt, the knowledge base and the functions.

Most operators do not need to build this themselves. They need to understand it well enough to know what they are buying, what to ask for, and where a build will fail. Two posts go deeper on the decision: build, buy or managed service and what is bundled in a voice AI platform.

What "Real-Time" Looks Like at Production Scale

Three companies running on this exact pipeline today, worth studying.

Pine Park Health. Primary care for senior living communities. Phone tag was eating their schedule. They dropped a Retell voice agent in front of their scheduling line. Same STT → LLM → TTS pipeline as everyone else, just orchestrated tightly enough that callers didn't bail. Scheduling NPS went up 38%. Their clinical staff stopped spending half the day on the phone.

SWTCH. EV charging company. When a driver is stranded at a broken charger, "we'll call you back tomorrow" isn't an answer. They put Lucas, a Retell agent, on the line. Lucas picks up in seconds, walks drivers through urgent troubleshooting, and does it 24/7 across the same seven-stage pipeline. Support costs dropped more than 50%.

Medical Data Systems. Debt collection. Regulated, tonally sensitive, unforgiving when conversations go sideways. They put Retell agents on inbound calls and now handle 100% of incoming volume with only 30% of calls transferring to a human, collecting around $280,000 a month. The pipeline is the same one we just walked through. The difference is orchestration discipline and a long tail of small decisions about turn-taking, barge-in, and prompt design. (More customer stories here.)

The common thread across all three: none of them tried to invent the pipeline. They picked a platform that had the orchestration solved and focused their work on the parts that were proprietary to their business: the prompt, the knowledge base and the function endpoints.

Common Misconceptions About How This Actually Works

"It's just three APIs glued together." It is, until you try to make it feel real-time. Then the glue matters more than the APIs. VAD tuning, the turn-taking model, streaming coordination, barge-in handling and function-call routing are where production stacks differ.

"Bigger LLM = better voice agent." Not really. For most voice use cases, a fast mid-tier model with a good prompt beats a slow flagship, because the caller's perception is shaped so heavily by latency. Retell lets you swap LLMs with a dropdown specifically because the right answer depends on the use case.

"Streaming is a nice-to-have." It is the whole architecture. Without streaming, you wait for the caller to finish, then for STT to finish, then for the LLM to finish, then for TTS to finish. That is the sequential pipeline LiveKit puts at 2 to 4 seconds per reply.

"The voice is the hardest part." It is one of the more solved parts. Fast TTS models produce first audio in about a tenth of a second and come with fine control over delivery. The harder problems are turn-taking and barge-in, which callers do not consciously notice but do feel.

See the pipeline on a live call

If you want to see the pipeline in action, the fastest path is to build something on it. Sign up free at dashboard.retellai.com. New accounts get $10 in credits, around 90 minutes of conversation. Or book a demo and we'll walk through the orchestration in the context of your actual call volume. If you'd rather hear the latency for yourself, call our live demo line and talk to an agent running on the pipeline above.

FAQs

What do STT and TTS mean in AI?

STT stands for speech-to-text: software that turns spoken audio into written words. TTS stands for text-to-speech: software that turns written words into spoken audio. In a voice agent, STT sits at the start of each turn and TTS at the end, with a large language model (LLM) between them deciding what to say.

What is the STT, LLM, TTS pipeline?

It is the chain of three stages most voice agents use. STT turns the caller's audio into text. The LLM reads that text plus your system prompt and decides what to say or which function to call. TTS turns the reply back into audio. Turn-taking and barge-in handling sit around the chain.

What is real-time speech-to-speech voice AI?

Speech-to-speech voice AI uses one model that takes audio in and returns audio out, with no separate transcription and synthesis stages. OpenAI describes its Realtime API this way: the model works directly with audio, maintains conversation state, and can call tools.

What is the difference between a speech-to-speech API and a chained STT-LLM-TTS pipeline?

A chained pipeline runs three separate models and passes text between them, so you can read, log and change the text at each stage and replace any one component. A speech-to-speech API runs one model on the audio itself. OpenAI's voice agent guide recommends the chained path when each stage needs to be visible or replaceable, and the speech-to-speech path for speech, reasoning and tool use in one session.

How fast does real-time voice AI need to be?

People leave gaps of roughly 200 ms between turns in conversation, so a slow reply is noticed quickly. LiveKit's guide sets a target of under 1 second from the moment the user stops speaking to the moment the agent starts responding, and Pipecat's docs describe typical voice interactions as completing in 500 to 800 ms. Retell's stack is built to stay under ~700ms.

How much latency does text-to-speech add to a live voice AI call?

For the fast models, about a tenth of a second before network time. ElevenLabs lists Flash v2.5 at about 100 ms (median, excluding application and network latency) and Cartesia advertises first audio in under 90 ms for Sonic (both as of November 2026). ElevenLabs says its Multilingual v2 model has higher latency than its Flash models. LiveKit's target for TTS time to first audio is 100 to 300 ms.

What is a voice AI orchestration layer?

The orchestration layer is the software that runs the call around the three models. It moves audio between telephony, STT, the LLM and TTS, runs voice activity detection and turn-taking, stops playback when the caller interrupts, routes function calls, and keeps the conversation state in sync with what the caller actually heard.

How does function calling work inside a real-time voice agent?

The LLM is given a list of functions it may call. When a turn needs one, the model returns a function call with structured arguments instead of a spoken reply, the application runs it (for example, books the slot), and the result goes back to the model, which then answers the caller. The round-trip adds delay, so agents usually say something like "one moment while I check that" during slower calls.

What voice controls are common in live text-to-speech tools?

Speed, volume, voice consistency and pronunciation are the common ones. ElevenLabs exposes stability, similarity, style and speed settings plus pronunciation dictionaries. Cartesia's Sonic exposes speed (0.6 to 1.5), volume (0.5 to 2.0) and an emotion setting that is in beta. Some tools also accept SSML tags for pauses and emphasis.

What is barge-in handling?

Barge-in handling is what the agent does when the caller starts talking over it. A good stack stops the audio quickly, discards the rest of the planned reply, starts listening to the caller's new audio, and records what the caller actually heard so the agent does not repeat itself. A bad stack keeps talking.

Should you build your own STT-LLM-TTS stack or use a single voice agent API?

Build it yourself when you need control over every stage and have engineers to own a real-time system after launch. Open-source frameworks such as LiveKit Agents and Pipecat provide the pipeline, and you still own telephony, tuning and monitoring. Use a platform when the parts that are specific to your business are the prompt, the knowledge base and the functions, not the audio plumbing.

Does Retell AI let teams choose their underlying language model?

Yes. Retell lets you swap LLMs with a dropdown, because the right model depends on the use case. Time to first token matters as much as reasoning quality when you pick.

What is the difference between voice AI and an IVR?

An IVR is a fixed decision tree (press 1 for billing). Voice AI runs on the pipeline above: open-ended speech in, LLM reasoning in the middle, natural reply out. Callers do not navigate menus. They talk. Our post on voice AI vs IVR compares the two.

ROI Calculator
Estimate Your ROI from Automating Calls

See how much your business could save by switching to AI-powered voice agents.

All done! 
Your submission has been sent to your email
Oops! Something went wrong while submitting the form.
   1
   8
20
Oops! Something went wrong while submitting the form.

ROI Result

2,000

Total Human Agent Cost

$5,000
/month

AI Agent Cost

$3,000
/month

Estimated Savings

$2,000
/month

Estimate your monthly voice AI cost

$  0.11
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Estimated monthly cost
$1,408
12,800 conversation minutes

Revolutionize your call operation with Retell