PRODUCTION CASE STUDY // BUILT AT BHANZU Sep 2025 - Oct 2025

Enterprise AI Voice Automation Pipeline

Automating parent outreach & scheduling with low-latency event-driven bidirectional WebSockets

System Design & Data Orchestration

To solve expensive operational bottlenecks in mid-funnel demo reminders and rescheduling, we engineered a bidirectional event-driven WebSocket system. By moving from high-overhead human outreach to a low-latency multi-model stream loop, we automate workflows deterministically at scale.

1. Telephony Initialization

Twilio triggers /incoming-call or /outgoing-call webhooks, establishing a persistent, bidirectional WebSocket handling raw G.711 audio payloads.

2. Low-Latency STT Loop

Inbound audio streams straight to Deepgram Flux for Speech-to-Text over WebSockets. Text tokens stream immediately to our custom LLM orchestration layer.

3. Custom Barge-In Engine

When user interruption (barge-in) is detected by STT, the orchestration layer immediately wipes the outgoing audio queue on the Twilio media stream, allowing natural conversation pacing.

4. GPT-4o-mini & Parallel Tool Calling

The LLM dynamically executes parallel tool calls against internal CRM APIs to retrieve and update customer context without human error:

  • getUserProfileByMobileNumber — Looks up student/trial history using the incoming ANI.
  • getBatchDetails — Pulls live inventory states from the internal scheduling engine.
  • getAvailableSlotsForDay — Enables conflict-free scheduling mutations.

5. Voice Synthesis & Streaming Response

Response tokens stream directly to Deepgram Aura-2 (TTS), feeding raw binary audio buffers back to the Twilio media stream to maintain an end-to-end target latency under 900ms.

Visual Request Pipeline

Interactive live view of request packets navigating between servers.

🤖

Animated request flow visualization loading...

Production-Grade Interaction Features

To move beyond simple "AI wrappers" and achieve native, human-like voice conversations, the pipeline incorporates specialized low-latency interaction handling:

🎙️

Smart Barge-In & Interruption Detection

Conversations aren't strictly turn-based. If a parent starts speaking mid-sentence, the STT websocket registers speech inputs, triggering an immediate media stream queue wipe. The orchestrator halts the active TTS synthesis loop, listens to the interruption, and re-calibrates the LLM context dynamically to answer.

🌐

Multilingual Talkback & Hinglish Support

Designed specifically for localized demographic outreach. The pipeline uses system prompt formatting to support seamless multilingual conversations, switching dynamically between English, Hindi, and mixed Hinglish dialects without context drifts or translation overhead.

Rigorous Unit Economics

By automating calling operations, we transitioned from high fixed labor expenses to lean usage-based APIs. Here is the exact cost mapping for a typical 3-minute operational call in the India market context:

Expense Vector Human Agent Baseline Automated AI Pipeline
Primary Variable Avg Salary: ₹25,000/mo.
Capacity: ~2,000 clean calls/mo.
Twilio Inbound/Outbound:
~₹0.65 - ₹0.80/min
Transcription / Inference N/A Deepgram Flux STT: ₹1.90
GPT-4o-mini Processing: ₹0.07
Voice Synthesis N/A Deepgram Aura-2 TTS: ₹3.00
Blended Total Cost ₹12.50 – ₹15.00 per call ~₹7.07 per 3-min call

Business Impact Summary

30% Operational Headcount Reduction

Automated mid-funnel parent outreach (MOFU) within Q1 of deployment, shifting operations agents to high-tier queries.

100% CRM Data Entry Integrity

All demo rescheduling, slot confirmations, and student statuses are directly mutated via APIs, eliminating manual logging error rates.