Engineering ~517 ms First Audio and Fact Quarantine on Live Phone Lines
Two failure modes ruin inbound voice AI in five seconds: two-second dead air and improvised answers. Here is the Cloud Run, Twilio Media Streams, and Gemini Live architecture that solved both.
Why Desk-Tested Voice Demos Collapse on PSTN Lines
Most voice AI prototypes chain separate speech-to-text, LLM, and text-to-speech HTTP calls, creating two seconds of awkward dead air on every turn and tripping over caller barge-in.
Worse, teams rely on system-prompt instructions alone to stop the model from inventing prices, policies, or calendar availability.
Three Production Patterns From Live Cloud Run Telephony
On my live telephony bridge powering June at (904) 395-4849 (Twilio Programmable Voice + Media Streams into Gemini Live on Google Cloud Run), three systems choices keep calls fast and truthful:
- ▸Single WebSocket native-audio stream (~517 ms to first audio): Pumping bidirectional audio frames straight into a native-audio Live model on warm Cloud Run instances cut first-turn audio latency from roughly two seconds down to ~517 ms while handling barge-in at the stream layer.
- ▸Server-enforced fact quarantine and booking guards: Off-list policy questions route to an explicit human-verification handoff, while server code refuses to book any calendar slot not returned by Google Calendar FreeBusy on that call and rejects placeholder callback numbers.
- ▸26-scenario simulated-caller eval gate: Prompt and tool edits must pass 26 automated caller personas (including barge-ins, robocall recordings, and off-menu slot requests) graded across 7 rubric dimensions before deployment.
// VERIFIED PROOF & NEXT STEP
Inspect the Shipped System or Drop a Sanitized Brief
I partner with consultancies under MNDA and directly with operator leadership teams to build these systems inside your own Azure or Google Cloud tenant.