Case study

Vaani case study

Vaani is a multi-tenant voice AI platform for Indian businesses, built under Brandsap. It handles voice calls and WhatsApp conversations in English, Hindi, Marathi and other languages.

The problem

Indian businesses that want AI voice agents usually combine a telephony provider with a separate Indic speech and language provider, which adds cost and lock-in. Vaani aims to cover both on a vendor-neutral, free-tier-first stack.

What I built

A tenant management plane (accounts, API keys, dashboard), a real-time voice pipeline, telephony and WhatsApp integrations, billing with call-slot admission control, and deploy and diagnostics tooling.

My role

Founder and sole builder.

Architecture

  • FastAPI application with a WebSocket voice pipeline: speech to text, language model, text to speech.
  • Speech to text with AI4Bharat IndicConformer, falling back to Whisper; text to speech with Piper voices.
  • Language model routing across several providers with fallback.
  • Telephony through Jambonz (bring-your-own SIP), and WhatsApp through Meta webhooks.
  • PostgreSQL in production, SQLite in development.

Technologies

Python 3.12FastAPISQLAlchemy 2AlembicPostgreSQLPiperJambonzWebSockets

How it works

A caller or browser connects to the voice socket with a token. The server checks the token before accepting the connection, reserves a call slot for the tenant, then loops over audio: transcribe, generate a reply, synthesise speech and stream it back.

Key engineering decisions

  • Removed two unused heavy packages that caused a dependency conflict and pulled in many known vulnerabilities; Piper now runs as a pinned binary.
  • Model files are downloaded with a command that fails on HTTP errors, so a 404 page can never be saved as a voice model.
  • Call-slot reservations use deterministic idempotency keys with global and per-tenant caps.
  • Fixed Marathi speech that had been silently falling back to the English voice.

Challenges

  • Getting acceptable latency for Indic languages on free and low-cost providers.
  • Proving production behaviour (real SIP, real WhatsApp, live Postgres) when the development machine cannot run the full stack.

What I learned

In voice products silent fallbacks are the worst bugs, because the call still works and sounds wrong. Explicit failures are easier to fix.

Current status

Marketing site live. The backend has not been deployed to production yet.

Links

More case studies: Capital Intelligence OS · GridResolve AI · Rankelo · TalkBot · Bizia