Guide · AI Automation
The AI Voice Agent Tech Stack, Explained
Key takeaways
- Every AI voice agent is built from five layers: telephony/transport, speech-to-text (STT), the language model, text-to-speech (TTS), and orchestration.
- STT is the agent's ears (voice to text) and TTS is its mouth (text to voice); the LLM does the thinking in between and calls your tools.
- Latency is additive across all five layers, so target a sub-second response and optimize the whole chain, not one component.
- Streaming at every stage — STT, LLM, and TTS — plus good endpointing is the biggest, cheapest way to make an agent feel instant.
- Buy a managed platform for speed and simplicity; build your own for control over latency, cost, integrations, and data.
- Cost scales per audio minute (STT/TTS) and per token (LLM), so tight prompts and efficient tool use lower cost and latency together.
Who this guide is for
This guide is for founders, operations leaders, and technical buyers evaluating AI voice agents who want to understand what actually sits under the hood before they sign a contract or scope a build. If you have watched a demo and cannot tell whether the vendor is selling you a model, a platform, or a phone number, this is written for you.
You do not need to be an engineer. You do need to make decisions about latency, cost, data, and integrations, and those decisions get much easier once you can name the parts and see how they trade off. By the end you will be able to read any vendor's architecture diagram, ask the questions that separate a serious product from a wrapper, and judge whether to buy a platform or build your own.
The five layers of a voice agent
Every production AI voice agent is built from the same five layers, arranged as a loop that repeats on every conversational turn. Understanding the layers is the whole game, because vendors package them differently and hide the tradeoffs in the seams.
- Telephony and transport — connects the call (a phone number, SIP trunk, or web widget) and streams audio to and from the agent in real time.
- Speech-to-text (STT) — transcribes the caller's speech into text, ideally as they speak rather than after they finish.
- The language model (LLM) — the brain that interprets intent, follows your instructions, calls tools, and composes the reply.
- Text-to-speech (TTS) — converts the model's text reply into a natural-sounding voice.
- Orchestration — the conductor that manages turn-taking, interruptions, timeouts, tool calls, and connections to your CRM, calendar, and knowledge base.
Audio flows in through telephony, becomes text via STT, is reasoned over by the LLM, becomes speech again via TTS, and flows back out — all while orchestration keeps the timing tight and the conversation coherent. A weak link anywhere breaks the illusion of a real conversation.
Speech-to-text (STT)
Speech-to-text is the agent's ears: it converts the caller's audio into text the model can read. For voice agents the critical trait is not just accuracy but streaming — the STT engine emits partial transcripts as the person speaks, so the rest of the stack can start working before the caller finishes their sentence. Batch transcription that waits for a full utterance adds a delay you cannot afford in live conversation.
Judge an STT engine on four things: latency (how fast partials arrive), accuracy on real phone audio (8kHz, compressed, noisy), robustness to accents and industry vocabulary, and endpointing — its ability to detect when the caller has actually stopped talking versus just paused. Weak endpointing is a top cause of agents that interrupt callers or sit in awkward silence.
Two levers reliably improve results: custom vocabulary or phrase hints for names, products, and jargon the model would otherwise mishear, and choosing a model tuned for telephony rather than clean studio audio. This is where we spend real tuning effort, because a mistake here poisons everything downstream — the smartest LLM cannot recover a word it never received.
The language model (the brain)
The large language model is the decision-maker. It takes the running transcript plus your system prompt, business rules, and conversation history, then decides what to say, what to ask, and — crucially — which tools to call: look up an order, check calendar availability, create a CRM record, or transfer to a human. In a well-built agent the LLM rarely acts alone; it is wired to your systems through function calling so it can take real action, not just talk.
The tradeoff is capability versus speed and cost. Larger frontier models reason better and follow complex instructions more reliably, but they add latency and cost more per token. Smaller or faster models respond quicker and cheaper but may drift from instructions or fumble edge cases. Many production stacks route by task — a fast model for simple turns, a stronger model when reasoning or a tool decision is required.
Reliability comes less from the raw model and more from the scaffolding around it: a tight, well-tested prompt; guardrails that keep it on-topic and prevent it from inventing policy; structured tool definitions; and a clear escalation path to a human. That scaffolding is the bulk of the engineering work, and it is where we concentrate ours.
Text-to-speech (TTS)
Text-to-speech is the agent's voice: it turns the model's text reply into audio the caller hears. Modern neural TTS is convincingly human, so the decisive factors are time-to-first-byte (how quickly audio starts streaming after the text is ready) and streaming synthesis (starting to speak the first words while the rest of the sentence is still being generated). A voice that sounds perfect but starts a beat too late still feels robotic, because the pause is what people notice.
Beyond speed, evaluate naturalness and prosody, pronunciation control for names and domain terms, multilingual support if you need it, and voice cloning or brand-voice options if a consistent persona matters. Watch for how the engine handles numbers, dates, addresses, and email addresses — these are common failure points where a voice agent says a phone number as one giant integer.
People often confuse the two speech layers, so keep it simple: speech-to-text vs text-to-speech is ears versus mouth. STT is input, converting the caller's voice into text; TTS is output, converting the agent's text into voice. The LLM sits between them and does the thinking.
Telephony and transport
Telephony and transport is the plumbing that connects a real phone call to your software and streams audio both directions in real time. This layer handles inbound and outbound calls, the phone numbers, SIP trunking, call routing, warm transfers to human agents, DTMF (keypad) input, and voicemail detection. It is unglamorous and absolutely load-bearing — most of the ugliest production issues live here, not in the AI.
The transport protocol matters for latency. Media streaming over WebSocket or WebRTC keeps audio moving with minimal buffering, while older approaches that record-then-process add delay that kills the conversational feel. If your agent also lives on a website or app, the same stack should support a browser-based voice widget, not just the phone network.
Practical requirements to confirm: reliable call transfer with context passed to the human, graceful behavior when the network degrades, compliance features like call recording and consent handling, and carrier-grade uptime. Whether you use a communications platform (CPaaS) or a bundled provider, treat telephony as a first-class part of the stack rather than an afterthought.
Orchestration: platform vs build-your-own
Orchestration is the layer that turns four separate components into one coherent agent. It manages turn-taking and barge-in (letting a caller interrupt), handles silences and timeouts, sequences tool calls, maintains conversation state, and connects the whole loop to your CRM, calendar, and knowledge base. It is also where you decide the central architectural question: buy a platform or build your own.
A managed voice platform bundles STT, LLM, TTS, and telephony behind one API and dashboard. You get to production fast, with turn-taking and interruption handling already solved, and you trade away fine-grained control and some margin. Building your own — wiring best-of-breed components through an orchestration framework — gives you maximum control over latency, cost, model choice, and data residency, at the price of real engineering and ongoing maintenance.
- Lean toward a platform when you want speed to launch, have straightforward use cases, and prefer one vendor and one bill.
- Lean toward build-your-own when latency, cost at scale, deep custom integrations, or data control are dealbreakers, and you have the team to own it.
- A common middle path is an orchestration framework over swappable providers, so you keep control of the pipeline without writing the real-time audio loop from scratch.
How the pieces affect latency and cost
Latency is additive: total response time is telephony transport plus STT plus LLM plus TTS, and the caller feels the sum. The industry target is a response that begins in under about one second, because longer gaps make people talk over the agent or assume the line dropped. Every layer contributes, so you optimize the whole chain, not one favorite part — shaving the LLM while ignoring STT endpointing wins nothing.
The biggest, cheapest latency win is streaming everywhere: streaming STT, streaming LLM output, and streaming TTS, so each stage starts working on partial results instead of waiting for the previous stage to finish. Good endpointing (knowing when the caller stopped) and speaking the first words while the rest generates are what make an agent feel instant rather than merely fast.
Cost is usually metered per minute of audio (STT and TTS) plus per token (LLM), and it scales with call volume and conversation length. The levers that cut cost — smaller models, cheaper voices, aggressive truncation — often cost you quality or speed, so the real work is finding the point where the agent is fast enough, good enough, and affordable enough for your specific use case. Longer, chattier calls cost more on every axis, which is why tight prompts and efficient tool use pay off twice.
A reference stack we use
Here is how we think about assembling a voice agent at Zen in Tech, described by role so it stays vendor-neutral and current. We are a Houston agency with 20+ years and 700+ projects, AI voice agents are a flagship service, and everything we ship is built and tuned 100% in-house — so we build to whichever components best fit each client's latency, cost, and integration needs rather than to a fixed brand list.
- Telephony/transport: a carrier-grade provider with real-time media streaming (WebSocket/WebRTC), reliable warm transfer, and a browser widget option.
- STT: a streaming, telephony-tuned engine with custom vocabulary and strong endpointing.
- LLM: a capable model wired to your systems via function calling, with a tightly tested prompt, guardrails, and a clear human-handoff path — often task-routed between a fast and a stronger model.
- TTS: a low-latency neural voice with streaming synthesis and pronunciation control for names, numbers, and domain terms.
- Orchestration: a framework that owns turn-taking, barge-in, and state, and connects the loop to your CRM, calendar, and knowledge base.
We treat each layer as swappable, instrument the full pipeline so we can see where latency and cost actually go, and tune against real call recordings rather than demos. The goal is an agent that answers in under a second, sounds human, takes real action in your systems, and hands off gracefully when a person should take over.
Frequently asked questions
What is an AI voice agent tech stack?
It is the set of components that let software hold a real phone conversation: a telephony/transport layer to carry the call, speech-to-text to transcribe the caller, a large language model to decide what to say and which tools to call, text-to-speech to speak the reply, and an orchestration layer that manages turn-taking and connects to your CRM, calendar, and knowledge base.
What is the difference between speech-to-text and text-to-speech?
Speech-to-text (STT) is input: it converts the caller's spoken words into text the model can read. Text-to-speech (TTS) is output: it converts the model's text reply back into a natural-sounding voice. In short, STT is the agent's ears and TTS is its mouth, with the language model doing the reasoning in between.
How do AI voice agents work?
They run a real-time loop on every turn. Telephony streams the caller's audio in, STT transcribes it as they speak, the LLM interprets intent and calls any needed tools, TTS turns the reply into speech, and telephony streams it back out. Orchestration manages timing, interruptions, and system integrations so the whole round trip feels like a natural conversation.
What is a good latency target for a voice agent?
Aim for a response that begins in under about one second end to end. Latency is additive across telephony, STT, LLM, and TTS, so you optimize the full chain. The most effective fix is streaming at every stage plus strong endpointing, so each component starts working on partial results instead of waiting for the previous one to finish.
Should I buy a voice agent platform or build my own stack?
Buy a managed platform when you want fast launch, straightforward use cases, and one vendor to manage; you trade away fine control and some margin. Build your own when latency, cost at scale, deep integrations, or data control are dealbreakers and you have engineering to own it. A common middle path is an orchestration framework over swappable, best-of-breed providers.
How much does an AI voice agent cost to run?
Costs are usually metered per minute of audio for STT and TTS plus per token for the LLM, and they scale with call volume and how long conversations run. Larger models and premium voices cost more but improve quality; smaller ones cut cost at some expense of speed or accuracy. Tight prompts and efficient tool use reduce both cost and latency.