AI Voice Agents
Voice is the fastest-growing category in applied AI. Searches for "AI receptionist" grew 68x in a year, "AI call centers" over 100x, and "AI voice agents" 56x. Small businesses, clinics, and support teams want software that picks up the phone, books the appointment, answers questions, and logs the call — without hiring a call center.
An AI voice agent is a real-time pipeline: it listens (speech-to-text), thinks (an LLM decides what to say and which tools to call), and speaks (text-to-speech) — fast enough that the caller experiences a natural conversation. The hard part is not the models; it is the latency budget: humans notice pauses over ~800ms, so the entire loop must complete in under a second.
info
There are two architectures. The classic pipeline chains three models; the newer speech-to-speech (S2S) models handle audio end-to-end.
Pipeline Architecture (STT → LLM → TTS)
Audio is transcribed (Deepgram, Whisper), the text goes to an LLM (with tools and your knowledge base), and the response is synthesized (ElevenLabs, Cartesia, OpenAI TTS). More control, easier to debug, but each hop adds latency.
Speech-to-Speech (Realtime APIs)
Models like OpenAI's Realtime API and Gemini Live process audio natively — no separate transcription step. Lower latency and more natural prosody (interruptions, tone), at the cost of less control over each stage.
| 1 | // Conceptual voice agent loop (pipeline architecture) |
| 2 | async function handleCall(audioStream: AudioStream) { |
| 3 | for await (const chunk of audioStream) { |
| 4 | // 1. Speech-to-text (streaming) |
| 5 | const transcript = await stt.transcribe(chunk, { stream: true }); |
| 6 | if (!transcript.isFinal) continue; |
| 7 | |
| 8 | // 2. LLM decides the response (with tools + knowledge base) |
| 9 | const reply = await llm.generate({ |
| 10 | messages: [...history, { role: "user", content: transcript.text }], |
| 11 | tools: [bookAppointment, lookupOrder, transferToHuman], |
| 12 | }); |
| 13 | |
| 14 | // 3. Text-to-speech (streaming) — start speaking ASAP |
| 15 | for await (const audio of tts.synthesize(reply.text, { stream: true })) { |
| 16 | audioStream.write(audio); |
| 17 | } |
| 18 | history.push({ role: "user", content: transcript.text }, { role: "assistant", content: reply.text }); |
| 19 | } |
| 20 | } |
| Platform | Best For | Approach | Pricing Model |
|---|---|---|---|
| Vapi | Developers building custom voice agents | API-first, bring your own models | Per-minute |
| Retell AI | Production call agents, telephony built-in | Managed platform | Per-minute |
| Bland AI | Outbound calling, sales & reminders | Managed platform | Per-minute |
| OpenAI Realtime | Speech-to-speech, custom stacks | API (WebRTC) | Per-token (audio) |
| Deepgram / ElevenLabs / Cartesia | Best-of-breed STT and TTS components | Component APIs | Per-minute / per-character |
note
Natural conversation tolerates about 800ms of silence before it feels awkward. That budget is spent across the whole pipeline:
Speech-to-text (final transcript)
~300msUse streaming STT with endpointing (Deepgram, AssemblyAI) — start processing on partial transcripts.
LLM first token
~300msUse fast models (GPT-4o-mini, Claude Haiku, Gemini Flash) for turns; reserve big models for complex reasoning. Stream tokens.
Text-to-speech first audio
~200msStream TTS sentence-by-sentence (Cartesia, ElevenLabs Flash) — start speaking before the full reply is generated.
Network + telephony
~100msColocate with your telephony provider's region; use WebRTC where possible instead of websocket relays.
pro tip
Community
Get help on Slack, Discord or VIP
Stuck on a guide? Join the community and ask.