TwilioJesse SumrakTutorial
How to handle real-time interruptions in your AI voice agent
Summary
Real-world AI voice agent calls are messy, with background noise, overlapping speech, and callers interrupting mid-sentence. Twilio Conversation Relay handles interruptions through attributes like interruptible, which controls whether caller input stops the agent’s speech, and ignoreBackchannel, which filters out short backchannel phrases. Background noise that sounds like speech can cause false interruptions and garbled transcripts; Twilio’s testing found Deepgram Flux produced zero transcription failures under combined noise, while a tuned Nova-3 setup also succeeded. Turn detection uses either a traditional silence timer or Deepgram Flux’s fused model, which reduces false interruptions by roughly 30% and trims response latency. When a caller interrupts, the app receives an interrupt message with the exact text played before cutoff, allowing it to trim the LLM’s conversation history so the model only remembers what the caller heard.
Context
Real-world AI voice agent calls are noisy and interruptive. Over half of customers want human-like AI, and poor interruption handling breaks trust. Twilio Conversation Relay splits work between Twilio (STT, TTS, live audio) and the application (LLM decision-making).
Approach / What changed
Configure Twilio Conversation Relay attributes (interruptible, ignoreBackchannel, interruptSensitivity, speechTimeout) and use Deepgram Flux for turn detection to handle barge-in, backchannel noise, and background speech. The application trims LLM conversation history using the utteranceUntilInterrupt value from the interrupt message.
Takeaways
Twilio Conversation Relay’s interruptible attribute controls which caller input can stop agent speech: none, dtmf, speech, or any (default).
Deepgram Flux fuses transcription and turn detection, reducing false interruptions by roughly 30% and trimming response latency by 200–600 milliseconds compared to Nova-3.
When a caller interrupts, the app must trim the LLM’s conversation history using the utteranceUntilInterrupt value from the interrupt message to prevent the model from referencing unheard content.
FAQ
What is barge-in in voice AI?
Barge-in is when a caller starts talking while an AI voice agent is still speaking. Twilio Conversation Relay handles it with the interruptible attribute, which stops the agent's speech when caller audio or keypad input comes in.
How does Twilio Conversation Relay handle interruptions?
Twilio Conversation Relay detects caller speech during playback, stops text-to-speech, and sends your app an interrupt message with the exact text played before the cutoff. Your app then trims the LLM's history to match.
How do I stop background noise from interrupting my AI voice agent?
Twilio's testing found Deepgram Flux handled heavy noise on its default settings. On Nova-3, set interruptSensitivity to low and ignoreBackchannel to true. Both setups had zero transcription failures with a vacuum and drill running.
Source and freshness
- Source
- twilio.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.