Engineering

How AI Voice Agents Work: Telephony, Speech-to-Text, LLM and Text-to-Speech Explained

Shivam Yadav
Shivam Yadav
Co-Founder & Software Engineer, TaskVox AI
9 October 2026·10 min read
Quick answer

An AI voice agent runs a loop on every turn of a phone call: the caller’s audio is transcribed by speech-to-text (STT), a large language model (LLM) writes the reply using the script and the conversation so far, and text-to-speech (TTS) speaks it back down the line. Telephony carries the audio in and out, and turn-taking logic decides when the caller has finished and when the agent may speak. After the call, the transcript is analysed for the outcome.

Every AI phone call, on any platform, runs through the same basic stages. Here is what each one does and what to look for when you judge a voice agent — written for business owners and developers alike.

The pipeline at a glance

  1. Telephony — the call is placed (or answered) and its audio is streamed live.
  2. Speech-to-text — the caller’s speech becomes text, word by word.
  3. Turn detection — the system decides the caller has finished speaking.
  4. LLM — the model writes the next reply from the script, the conversation and what it knows about the contact.
  5. Text-to-speech — the reply becomes audio in the agent’s voice.
  6. Playback and barge-in — the audio plays; if the caller interrupts, playback stops and the loop restarts.
  7. Post-call analysis — the transcript is summarised and the lead is labelled.

1. Telephony: getting the voice in and out

A phone call is not a web request. Audio arrives as a continuous stream — on most Indian phone networks as narrow-band 8 kHz audio — carried between the carrier and the platform over telephony protocols such as SIP. The platform has to receive that stream live and play the agent’s voice back the same way.

Two practical consequences follow. Everything the AI hears has already lost quality to the phone network, so speech recognition must cope with telephone audio. And the voice the caller hears is squeezed into the same narrow band, so a voice that sounds superb on a laptop can sound thin on a phone. Always judge a voice agent on a real phone call.

2. Speech-to-text: streaming, not batch

The agent cannot wait for a whole sentence to be recorded and then upload it. A streaming speech-to-text engine receives audio in small chunks and returns text continuously — provisional words first, then final text for stretches it is sure about.

Accuracy matters more than anything else here. If the agent mishears, the caller has to repeat themselves and the conversation stalls. Test any platform with long, hesitant answers, Indian names, numbers and Hinglish — that is where weak recognition shows.

3. Turn-taking: when has the caller finished?

Humans leave very short gaps between turns. A voice agent has to judge from silence and speech cues when the caller has finished. Cut in too early and it interrupts; wait too long and the call feels sluggish. Good agents also stop speaking the moment the caller talks over them.

4. The LLM: the agent’s brain

The language model receives instructions (who the agent is, the business, the script and the questions to ask), the conversation so far, and details about the contact, such as their name or the product they enquired about. It writes the next reply.

For phone calls the model has to be fast, keep replies short and stay on script — a model that writes long paragraphs makes a poor phone agent, however clever it is. Short replies are also the simplest way to make any voice agent feel quicker.

5. Text-to-speech: a voice people trust

TTS turns each sentence into audio. For Indian callers the hard parts are not the vowels; they are the details:

  • Numbers — “₹4,500” or a 10-digit mobile number must be read the way a person would say it, in the right language.
  • Code-switching — a Hinglish sentence needs a voice that handles both languages without an odd accent shift mid-sentence.
  • Names — a wrongly pronounced name in the first second loses the caller’s trust.

TaskVox offers a basic voice and a Premium Voice in Hindi, English and 8 more Indian languages.

6. Playback and barge-in

Real callers interrupt. When the caller starts speaking over the agent, playback has to stop at once and the next reply has to make sense of the interruption. Handling this well is one of the clearest differences between a demo and a production agent.

7. After the call: from transcript to lead

When the call ends, the transcript is analysed: a summary is written, the answers to the qualifying questions are extracted, and the lead is labelled Hot, Warm, Cold or Not a lead. On TaskVox, Hot and Warm labels are checked against the transcript before they are saved, so a polite “okay” does not become a hot lead. The result can be sent to your CRM by webhook — see connecting an AI calling agent to your CRM.

What changes for Indian languages

  • Speech recognition chosen per language, tuned for phone audio.
  • A prompt that lets the agent follow the caller between Hindi and English.
  • Digits, currency and dates expanded the way a native speaker says them.
  • Respect for Indian calling rules — campaign calls only between 8 am and 8 pm, and a do-not-call list checked before every dial.

Frequently asked questions

How does an AI voice agent work?

A phone call’s audio is streamed to a speech-to-text engine, which turns the caller’s words into text. A large language model reads that text with the conversation so far and the business’s script, and writes a reply. A text-to-speech engine turns the reply into a voice, which is played back down the phone line. This loop repeats every turn until the call ends, and the transcript is then analysed for the outcome.

What is STT, LLM and TTS in voice AI?

STT (speech-to-text) converts the caller’s speech into text; the LLM (large language model) decides what to say next; TTS (text-to-speech) converts that reply into natural-sounding audio. Together they form the core pipeline of every AI voice agent.

Can AI voice agents understand Hinglish?

Yes, if the speech recognition model and the prompt are set up for it. Indian callers often mix Hindi and English in one sentence, so the agent must recognise both, reply in the caller’s mix, and read numbers and names the way an Indian speaker would.

Why do some AI phone calls feel slow?

Each turn waits for the caller to finish, then for speech recognition, the language model and voice synthesis. Long replies and slow models make the pause before the agent speaks noticeable; short, scripted replies help most.

Do AI voice agents need special phone lines?

They need a telephony connection that can stream live call audio to the AI, usually over SIP. Platforms such as TaskVox include the telephony, so a business does not need its own carrier setup.

Shivam Yadav
Co-Founder & Software Engineer, TaskVox AI

Full-stack AI engineer specialising in voice AI, real-time communication systems and telephony. Built the TaskVox AI calling platform from the ground up. More articles →

Hear the pipeline on a real call

100 free credits · test an agent in your browser · ₹2–₹4/min

Read next