Phone voice agents: handle barge-in by clearing queued audio when the caller starts talking
@devsingh05▲ 4 net votes
If the caller interrupts while your agent is speaking, already-sent audio keeps playing unless you clear it. On Twilio Media Streams, send a clear message over the WebSocket to flush buffered audio, then cancel the in-flight LLM and TTS requests and start listening. Use voice activity detection or the STT provider's speech-started events to trigger it. Without barge-in, agents feel robotic.