AI Voice Agent Development: What It Really Takes
Field notes on building an AI voice calling agent: the speech-to-text, LLM and text-to-speech pipeline, latency budgets, VAD tuning, prompt compression, tool calls and CRM integration.
Voice agent demos look magical. Then you put one on a real phone line with a real lead, and it pauses for three seconds, talks over the caller, or answers a question nobody asked. AI voice agent development is mostly the unglamorous work of closing that gap: latency, turn-taking, language and reliable actions.
I built an AI voice calling agent for Antoc AI, a real-estate CRM used by 100+ firms in India. It is a Hinglish sales agent that calls leads, qualifies them and updates the CRM through tool calls. These are the field notes I wish I had at the start.
TL;DR
A voice agent is a pipeline: speech-to-text, an LLM with tools, and text-to-speech, wrapped in telephony and turn-taking. Use a voice platform for the plumbing. Spend your effort on latency (VAD tuning, prompt compression, streaming), natural language for your market, and tool calls that write outcomes to the CRM. Test on real calls, not demos.
key takeaways
- Latency, not model intelligence, decides whether a voice agent feels human, so every stage of the pipeline needs a time budget.
- Voice activity detection settings control interruptions and awkward pauses more than almost any other parameter.
- Shorter prompts respond faster, so compress system prompts and pass only the context the current call needs.
- A voice agent earns its keep through tool calls that update the CRM, not through the conversation alone.
The anatomy of a voice agent
Every voice agent, whatever the vendor, has the same moving parts:
| Stage | Job | What can go wrong |
|---|---|---|
| Telephony | Place or receive the call, stream audio | Poor audio quality, dropped calls |
| Voice activity detection (VAD) | Decide when the caller has finished speaking | Cuts callers off, or waits too long |
| Speech-to-text (STT) | Turn audio into text | Mishears names, numbers, mixed languages |
| LLM | Decide what to say and which tools to call | Slow first token, rambling, off-script |
| Tools | Read and write business data | Wrong arguments, slow APIs |
| Text-to-speech (TTS) | Speak the reply | Robotic tone, wrong pronunciation |
A voice platform typically handles telephony, audio streaming and orchestration, and lets you plug in STT, LLM and TTS providers. That is the right call for most teams. Building the realtime audio plumbing yourself is months of work that does not differentiate your product.
Latency is the product
On a phone call, silence feels broken. Humans expect a response within about a second. Your pipeline has to fit VAD, STT, LLM thinking, tool calls and TTS into that window, which means every stage needs a budget.
Tune VAD before anything else
VAD decides when the caller is done. Set the silence threshold too short and the agent interrupts people mid-sentence, especially when they pause to think ("Haan, budget toh... around 80 lakh"). Set it too long and every turn starts with dead air. I spent a lot of time adjusting silence duration and sensitivity against real recordings until turn-taking felt natural for how people actually speak on sales calls.
Compress the prompt
The LLM's time to first token grows with prompt length. A long system prompt full of edge cases and examples is slow on every single turn. I rewrote the system prompt into a compact form: the persona, the goal of the call, strict style rules (short sentences, Hinglish, one question at a time), and tool descriptions. Lead-specific context like name, project interest and source goes in as a few short fields, not a dump of the full record.
Stream everything
Stream STT results, start the LLM as soon as the turn ends, and start TTS on the first sentence of the reply instead of waiting for the whole answer. Short replies help here too. A voice agent that answers in one or two sentences is faster and sounds more human than one that reads a paragraph.
Keep tools fast
If the agent calls a tool mid-conversation, that API call is on the critical path. Keep tool endpoints lean, index the lookups they make, and have the agent say a brief filler ("Ek second, check karta hoon") when a call might take longer.
Language and persona for your market
For Indian real estate leads, pure English or formal Hindi both sound wrong. People speak Hinglish, switching mid-sentence, with English words for numbers, property types and amenities. That affects every layer:
- STT must handle code-switching. I used Sarvam's speech models, which are built for Indian languages.
- LLM prompts must ask for natural, conversational Hinglish and show the register you want.
- TTS must pronounce both Hindi and English words naturally, including project names and locality names.
- Numbers need care: "80 lakh", "2 BHK", "possession 2027" must be understood and spoken correctly.
Tools: where the value is
A voice agent that chats nicely but changes nothing is an expensive voicemail. The value comes from actions. Give the LLM a small set of well-described tools, such as:
update_lead: set budget, preferred location, property type, timeline.set_stage: move the lead to interested, not interested or call back.schedule_callbackorbook_site_visit: create a follow-up with date and time.add_note: write a short call summary to the lead timeline.
Validate every argument on the server before writing, because LLMs occasionally send malformed values. The Gemini function calling documentation explains how to declare tools and handle calls.
How I built this in practice
In the Antoc case study the voice agent sits alongside lead capture, WhatsApp automation and the MCP server. It is a Hinglish sales agent built with Sarvam for speech-to-text and text-to-speech and Gemini as the LLM, orchestrated through a voice platform. The heaviest work went into latency: tuning VAD so the agent neither interrupted nor lagged, and compressing prompts so responses started quickly.
During calls the agent updates leads through tool calls, so qualification details and outcomes land in the CRM without anyone typing them. Those updates flow into the same pipeline, assignment rules and WhatsApp follow-ups the sales team already uses, which is what turns a call into a next step.
Common mistakes
- Judging a voice agent on demo calls instead of real leads with background noise and code-switching.
- Leaving VAD on defaults, causing interruptions or long silences.
- Using a long, example-heavy system prompt that slows every turn.
- Waiting for the full LLM reply before starting text-to-speech.
- Building a conversational agent with no tools, so nothing reaches the CRM.
- Trusting tool arguments from the LLM without server-side validation.
keep reading
FAQ
How long does AI voice agent development take?+
A working prototype on a voice platform can take a couple of weeks. Getting it production ready, with tuned latency, reliable tool calls, CRM integration and testing across real calls, typically takes one to three months.
Can an AI voice agent speak Hindi or Hinglish?+
Yes. Speech providers focused on Indian languages, such as Sarvam, offer speech-to-text and text-to-speech that handle Hindi and mixed Hinglish speech. Prompting the LLM to reply in natural Hinglish matters just as much.
What latency is acceptable for a voice agent?+
In my experience, responses need to begin within roughly one to one and a half seconds after the caller stops speaking to feel natural. Beyond that, callers start repeating themselves or talking over the agent.
Do I need a voice platform or can I build everything myself?+
A voice platform handles telephony, streaming audio and turn-taking, which saves months. Build your own logic, prompts and tools on top, and only go fully custom if you have unusual scale or control needs.
How does a voice agent update my CRM?+
Through tool calls. The LLM is given functions like update_lead or book_site_visit, and when it calls them during the conversation, your backend validates the arguments and writes to the CRM.
Devang Gandhi
AI & full stack developer at Passdn, building CRMs, SaaS, AI agents and Flutter apps for clients in the US, UK, Australia, UAE and India. More about me