|$ curl https://forge-ai.dev/api/markdown?path=docs/ai/voice-agents
$cat docs/ai-voice-agents.md
updated November 2026·23 min read·published

AI Voice Agents

◆Voice AI◆Agents◆Speech◆Realtime◆Advanced🎯Free Tools
The Voice AI Boom

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

This is one of the highest-CPC topics in AI right now (voice AI, call center software, and business phone advertisers pay premium rates). It is also a genuinely buildable product: a working voice agent MVP is a weekend project with modern platforms.
How Voice Agents Work

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.

voice-agent-loop.ts
TypeScript
1// Conceptual voice agent loop (pipeline architecture)
2async 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}
Voice AI Platforms Compared
PlatformBest ForApproachPricing Model
VapiDevelopers building custom voice agentsAPI-first, bring your own modelsPer-minute
Retell AIProduction call agents, telephony built-inManaged platformPer-minute
Bland AIOutbound calling, sales & remindersManaged platformPer-minute
OpenAI RealtimeSpeech-to-speech, custom stacksAPI (WebRTC)Per-token (audio)
Deepgram / ElevenLabs / CartesiaBest-of-breed STT and TTS componentsComponent APIsPer-minute / per-character
📝

note

Platform choice matters less than people think. Most production teams assemble the pipeline themselves: Twilio (telephony) + Deepgram (STT) + their LLM + ElevenLabs/Cartesia (TTS). Managed platforms like Vapi and Retell are faster to launch but cost more per minute and give you less control.
The Latency Budget (Most Important Section)

Natural conversation tolerates about 800ms of silence before it feels awkward. That budget is spent across the whole pipeline:

Speech-to-text (final transcript)

~300ms

Use streaming STT with endpointing (Deepgram, AssemblyAI) — start processing on partial transcripts.

LLM first token

~300ms

Use fast models (GPT-4o-mini, Claude Haiku, Gemini Flash) for turns; reserve big models for complex reasoning. Stream tokens.

Text-to-speech first audio

~200ms

Stream TTS sentence-by-sentence (Cartesia, ElevenLabs Flash) — start speaking before the full reply is generated.

Network + telephony

~100ms

Colocate with your telephony provider's region; use WebRTC where possible instead of websocket relays.

🔥

pro tip

The single biggest perceived-latency trick: start the TTS on the first sentenceof the LLM response while the rest is still streaming. The agent starts "thinking out loud" instantly instead of going silent. Also handle interruptions (barge-in) — humans interrupt, and your agent must stop talking and listen.
Best Practices
◆Design for barge-in from day one — callers will interrupt, and an agent that can't be interrupted feels robotic
◆Give the LLM tools, not just a script: booking lookup, calendar, CRM, order status — real utility is why people tolerate talking to a machine
◆Always offer a human escape hatch ('say agent anytime') — and honor it. Forcing callers to fight a bot destroys trust
◆Disclose that it's an AI at the start of the call — required by law in several jurisdictions, and it increases completion rates anyway
◆Test with real phone audio, not studio recordings — compression, background noise, and accents break naive setups
◆Log full transcripts and review failures weekly — voice agents fail in ways text agents don't (misheard names, numbers, addresses)
◆Set a hard max call duration and a fallback SMS with a link — some tasks are better finished async
$Blueprint — Engineering Documentation·Section ID: AI-VOICE-AGENTS·Revision: 1.0

Community

Get help on Slack, Discord or VIP

Stuck on a guide? Join the community and ask.