DEV Community

Mango Developer
Mango Developer

Posted on Originally published at mangodeveloper.com

Building a Production AI Voice Assistant with Whisper, LLMs, and TTS

$33

$34

$35

Prerequisites

You'll need:

  • Python 3.10+ (3.11 preferred for the asyncio performance improvements)
  • An NVIDIA GPU with at least 8GB VRAM if you want to run all three models locally. A 3060 12GB is the sweet spot. You can run CPU-only but expect 2-3x higher latency.
  • FFmpeg installed system-wide (apt install ffmpeg on Debian/Ubuntu, brew install ffmpeg on macOS)
  • A basic understanding of asyncio and WebSockets. If you've never written an async server before, this will hurt.

That's it for hardware. The whole stack fits on one box. If you want to split it across machines (Whisper on a GPU box, LLM on another, TTS on a third), that's a fine production topology, and I'll show you where the seams go.

$36

$37

$38

$39

$3a

$3b

$3c

$3d

$3e

$3f

$40

$41

Cost Analysis: Local vs Hosted

For a voice assistant handling 100,000 minutes of audio per month (a small B2B product):

Component Local (1× A10 GPU box) Hosted (OpenAI/Deepgram/ElevenLabs)
STT $0 (amortized hardware) $600/mo (Deepgram @ $0.006/min)
LLM $0 $1,500/mo (GPT-4o-mini @ ~$0.015/min avg)
TTS $0 $3,750/mo (OpenAI TTS @ ~$0.0375/min avg)
Hardware $800/mo (cloud GPU lease) $0
Total $800/mo $5,850/mo

The crossover is around 30,000 minutes/month. Below that, hosted is cheaper because you don't need to lease a GPU. Above it, local wins by a wide margin. Most serious voice products land in the "local LLM + hosted STT/TTS" middle ground, which gets you the best of both - $1,500-2,000/month total.

Real-World Use Cases

  • Customer support co-pilots: Whisper transcribes the call in real time, the LLM surfaces relevant KB articles to the human agent, TTS is not used. Latency-tolerant because the human is the one talking to the customer.
  • Knowledge-base voice bots: "What's our refund policy?" → answer read aloud. High-volume, low-complexity. The sweet spot for local LLMs.
  • Accessibility tools: Screen readers, voice-controlled interfaces for users with mobility impairments. Latency and privacy matter - local is the right call.
  • In-car assistants: Whisper + a small LLM on-device. No network dependency. The use case that motivated Apple's on-device Whisper push.
  • Language learning: Conversational practice with a patient AI tutor. TTS quality matters more than latency here.
  • Meeting transcription + Q&A: Whisper transcribes, LLM answers questions about the meeting in progress. TTS optional.

Conclusion

Building a voice assistant that doesn't suck is mostly plumbing. The models are good enough. The hard parts are the seams - VAD timing, interruption handling, latency budgets, conversation history, and the dozen small bugs that turn a demo into a product.

Start with the simple version in this article. Measure where latency actually goes - it's almost never where you expect. Then optimize the bottleneck, one stage at a time. Don't reach for the OpenAI Realtime API until you've at least tried to build it yourself; you'll learn more about voice UX in a weekend of building than in a year of API calls.

The economics have flipped. A voice assistant that used to cost $5,000/month in API fees can run on a $1,500 box. That's a new product category opening up. Build something for it.


Originally published on Mango Developer.

Top comments (0)