Skip to content
AI Playbooks · 11 min read

How Voice AI Works: A Beginner’s Playbook on Speech-to-Text, Text-to-Speech and Voice Agents

Learn how voice AI works in plain words: speech-to-text, the AI brain, text-to-speech, the one-second rule and turn-taking, in six beginner plays.

Cover image for How Voice AI Works, a beginner's playbook showing speech-to-text, turn-taking and text-to-speech

It is 7:40 on a Monday morning in Pune. Meera’s uncle runs a small dental clinic, and his phone has been ringing since seven. Most callers want to book a slot, move one, or ask about Saturday hours. His receptionist starts at ten.

“Can your AI answer the phone?” he asks Meera, who writes software for a living. She has built chatbots before. But a chatbot that talks out loud feels different. So she sits down to learn how voice AI works, step by step, before she writes a single line of code.

This chapter is her notebook on how voice AI works. By the end you will know the three parts inside every voice assistant, why one second of silence decides whether it feels human, and how to test a voice feature before real people call it.

Last verified: 29 November 2026. AI tools change fast; check the linked sources for anything newer.

Who this is for: complete beginners and developers who have used a text chatbot and want to understand how voice AI works before adding a voice. No audio experience needed. Time needed: about 30-40 minutes to read and try the plays.

How voice AI works, in simple words

Think of a voice assistant as a small team at a call centre. One person only listens and types what the caller says. A second person reads the note and decides what to answer. A third person reads the answer aloud in a friendly voice.

That is how voice AI works at its core: three pieces of software, each with one job.

  • Speech-to-text (STT): the ears. It turns spoken audio into written words. You may also see it called speech recognition or ASR.
  • The language model (LLM): the brain. It reads the words and writes a reply, exactly like a text chatbot. If you are new to this part, read how LLMs work first.
  • Text-to-speech (TTS): the mouth. It turns the written reply back into a natural-sounding voice.

Around them sits a coordinator, often called the orchestration layer. It passes audio and text between the three, decides when the caller has finished talking, and stops the voice if the caller interrupts.

Precisely: a voice agent is a program that listens to speech, understands it with a language model, can take actions such as booking a slot, and replies with synthesised speech in real time.

Two ways to build it

Most production voice agents today use the three-step chain above, called a cascaded pipeline. LiveKit’s guide to voice agent architecture (February 2026) calls it the standard architecture, because you can pick and swap each part.

The newer option is a speech-to-speech (realtime) model that hears audio and answers in audio directly, with no text step in the middle. LiveKit says this can get replies under 500 milliseconds with more natural tone, but you get less control over each part and it can cost more per token.

Why one second matters

Speed is the part of how voice AI works that callers notice first. In a normal conversation, people answer each other within a fraction of a second. A gap of two or three seconds feels like the line dropped. This waiting time is called latency.

Twilio’s guide to voice agent latency (November 2025) gives starting targets for a cascaded agent. Measured from the moment the caller stops speaking to the moment they hear the reply:

StepTargetUpper limit
Speech-to-text350 ms500 ms
LLM first word (time to first token)375 ms750 ms
Text-to-speech first sound100 ms250 ms
Whole turn, mouth to earabout 1,115 ms1,400 ms

Twilio is clear that these are starting benchmarks, not best-in-class. The lesson for a beginner: you have roughly one second to share between three parts plus the network, so every part must be quick.

The playbook at a glance

  1. Pick one small conversation the assistant should handle.
  2. Choose your build: a no-code platform, a cascaded pipeline, or a speech-to-speech model.
  3. Stream every step so the reply starts before the thinking ends (see the streaming playbook).
  4. Get turn-taking right: know when the caller is done, and stop when they interrupt.
  5. Write for the ear, not the eye.
  6. Test with real voices, noise and a stopwatch.

Play 1: Pick one small conversation

Goal: a voice assistant that does one job well, instead of ten jobs badly.

  1. Write down the top three reasons people call.
  2. Pick the one that is most common and lowest risk.
  3. Write five example calls as a short script, including one confused caller.
  4. Decide what happens when the assistant is unsure: hand over to a person or take a message.

Meera picks “book a new appointment”. Moving and cancelling slots can wait until booking works.

You are done when: you can describe the job in one sentence and you have five sample calls written down.

Play 2: Choose how you will build it

Goal: pick the simplest build that meets your needs.

  1. If you want to learn the idea fast, start with a no-code voice platform that connects the three parts for you.
  2. If you need to choose your own STT, LLM and TTS, or keep data in a certain region, use a cascaded pipeline.
  3. If natural tone and the fastest replies matter most, try a speech-to-speech model.
  4. For actions like booking, connect your own functions. The function calling playbook shows how.

Meera chooses a cascaded pipeline. She wants to see each step’s transcript in her logs, so she can tell whether a mistake came from the ears, the brain or the mouth.

You are done when: you have written down which STT, LLM and TTS (or which single realtime model) you will try first.

Play 3: Stream every step

Goal: the caller hears the first words quickly, even if the full answer is still being written.

Streaming is the trick behind how voice AI works so quickly. Imagine a waiter who brings the bread while the kitchen cooks the main course. You do not wait for the whole meal before anything arrives. Streaming works the same way.

LiveKit notes that a pipeline where each step waits for the previous one often produces 2-4 seconds of delay, while streaming all three steps can bring it under one second.

# Illustration only: real SDKs name these differently
for audio_chunk in microphone():
    text = stt.feed(audio_chunk)          # ears: partial words
    if turn_detector.user_finished(text):
        for sentence in llm.stream(text):  # brain: reply piece by piece
            speaker.play(tts.speak(sentence))  # mouth: talk right away
            if user_started_talking():
                speaker.stop(); llm.cancel(); break

In plain steps: the ears turn small pieces of audio into words as they arrive. When the caller finishes, the brain starts writing the reply. Each finished sentence goes straight to the mouth, so speaking starts after the first sentence, not the last. If the caller speaks, everything stops.

Meera sends each sentence to text-to-speech the moment it is complete. Her first reply now starts while the model is still writing the second sentence.

You are done when: the assistant starts speaking before the full reply has been generated.

Play 4: Get turn-taking right

Goal: the assistant knows when to talk, when to wait, and when to stop.

Turn-taking is the hardest part of how voice AI works on a real call. A pause can mean “I am done” or “I am thinking”. Get it wrong and the assistant either cuts people off or leaves awkward silences.

  1. Voice activity detection (VAD) tells speech apart from silence. It is fast, but it cannot tell a thinking pause from the end of a sentence.
  2. Endpointing (end-of-turn detection) decides the caller has finished. Simple versions wait for a fixed silence; Twilio notes most defaults sit around 500 ms. Smarter versions also use the meaning of the words.
  3. Barge-in means the caller interrupts. The assistant must stop speaking at once, cancel the reply being written, and listen.

Twilio warns that pushing end-of-turn detection too hard makes the agent interrupt people, so err on the side of patience.

Meera tests a caller reading out a phone number with pauses: “98220… 45…”. Her first version jumped in after “98220”. She switches on the smarter end-of-turn setting, and it waits.

You are done when: the assistant lets a slow speaker finish, and stops talking within a moment when interrupted.

Play 5: Write for the ear, not the eye

Goal: replies that sound natural when spoken.

  1. Tell the model in its instructions that its answer will be spoken aloud.
  2. Ask for short sentences and one question at a time.
  3. Ban lists, tables, links, emoji and markdown in the reply.
  4. Ask it to write numbers, dates and times the way people say them: “ten thirty on Tuesday”, not “10:30 Tue”.
  5. Read back important details, like the booked time, for confirmation.

Meera’s first reply was a neat bullet list of free slots. Spoken aloud it was a mess. Now the assistant says: “I have ten thirty or four o’clock on Tuesday. Which suits you?”

You are done when: every sample reply sounds like something a polite receptionist would say.

Play 6: Test with real voices, noise and a stopwatch

Goal: find problems before real callers do.

  1. Record your five sample calls in different voices, accents and speeds.
  2. Add background noise: traffic, a fan, a TV.
  3. For each call, check the transcript (did the ears hear right?), the reply (did the brain answer right?) and the voice (was it clear?).
  4. Time each turn from the end of the caller’s speech to the first sound of the reply. Look at the typical time and the slowest ones.
  5. Keep failing calls as tests, and rerun them after every change. Our AI evals playbook shows how.

Meera finds that her STT writes “root canal” as “route canal” on a noisy line. Many STT services let you add a list of expected words, so she adds the clinic’s common terms.

You are done when: all five calls pass in at least two noisy conditions, and most turns land near your one-second target.

Do you need this?

OptionGood forTrade-off
No-code voice platformLearning fast, simple booking or FAQ linesLess control, platform fees
Cascaded pipeline (STT, LLM, TTS)Choosing each part, readable transcripts, debuggingMore moving parts where delay adds up
Speech-to-speech modelFastest, most natural repliesLess control per step, can cost more
Text chatbot onlyUsers who prefer typing, or noisy placesNo hands-free use

Mistakes to avoid

Most mistakes come from treating voice like text. Once you see how voice AI works as a live conversation, they are easy to avoid.

  • Waiting for each step to finish. Fix: stream all three steps so speaking starts early.
  • Using chatbot-style replies. Fix: instruct the model that its answer is spoken, short and plain.
  • Cutting people off. Fix: use smarter end-of-turn detection and test with slow speakers.
  • Ignoring interruptions. Fix: stop audio, cancel the reply and any tool call the moment the caller speaks.
  • Testing only in a quiet room. Fix: test with noise, accents and real phone lines.

How to know it is working

  • Most turns feel under about a second, with no long silences.
  • Transcripts of your test calls are correct for names, numbers and dates.
  • The assistant stops talking quickly when you interrupt it.
  • Callers finish the task (a booking) without asking for a human.

Your checklist

Use this list every time you test how voice AI works in your own app.

  • ☐ One small conversation chosen, with five sample calls
  • ☐ Build chosen: no-code, cascaded or speech-to-speech
  • ☐ Streaming switched on for every step
  • ☐ End-of-turn detection and barge-in tested
  • ☐ Instructions say the reply will be spoken aloud
  • ☐ Tested with noise, accents and a stopwatch
  • ☐ Hand-over to a person when the assistant is unsure

Frequently asked questions

How does voice AI work on a phone call?

The caller’s audio travels over the phone line to the speech-to-text service, the words go to a language model, and the reply is turned into speech and sent back. Twilio notes the network itself adds delay on top of the platform, so measure the whole trip.

What is the difference between a voice assistant and a voice agent?

A voice assistant mostly answers questions. A voice agent can also take actions, such as booking a slot or checking an order, by calling tools. Under the hood both use the same listen, think and speak loop. See the AI agents playbook for the action side.

Can I build a voice agent without coding?

Yes. No-code voice platforms connect speech-to-text, a model and text-to-speech for you. They are a good way to learn. You will still need to write clear instructions and test carefully.

What is a good response time for voice AI?

Aim for about one second from when the caller stops talking to when they hear the reply. Twilio’s starting target is about 1.1 seconds mouth to ear, with 1.4 seconds as an upper limit.

Is speech-to-speech better than a cascaded pipeline?

Not always. Speech-to-speech can be faster and sound more natural. A cascaded pipeline gives you more control and readable transcripts, which makes debugging easier. Many teams start cascaded.

Back at the clinic

Two weeks later, Meera’s assistant answers the 7 a.m. calls. It listens, waits for slow speakers, offers two times, reads back the booking and hands tricky calls to the receptionist’s message box. Her uncle’s only complaint: it is more polite than he is.

Now you know how voice AI works from the caller’s first word to the assistant’s reply. Your next step: write down the one conversation you would hand to a voice assistant, and record five sample calls on your phone today. Then read the function calling playbook so your assistant can actually book the slot.

Sources: Twilio’s guide to voice agent latency (latency targets, end-of-turn detection, interruptions; November 2025) and LiveKit’s guide to voice agent architecture (cascaded vs speech-to-speech, streaming, VAD and turn detection; February 2026). Meera, the clinic and the example calls are illustrative.

Leave a Reply

Your email address will not be published. Required fields are marked *

Newsletter

Get the next guide before anyone else.

One email a week with new playbooks and tutorials. No spam, unsubscribe anytime.