By Hakim Engineering11 min read

Interruption handling and turn detection in voice agents: a practical guide

Why 'the AI keeps talking over me' is a plumbing problem, not a model problem, why English-tuned turn detectors misread Arabic conversational cadence, and what a TTS layer needs to cancel cleanly within 100 ms.

EngineeringProduct

"The AI keeps talking over me" is the single most common complaint about voice agents that otherwise work fine. It's rarely an LLM problem: it's a turn-detection problem, and it's one of the few places where getting the plumbing right matters more than picking a better model. This is a practical guide to how interruption handling actually works, why the naive implementation fails, and what to tune specifically for Arabic conversational speech.

What "interruption handling" actually means

A voice agent is mid-response, generating and speaking text, when the caller starts talking again. The system needs to: detect that the caller is speaking (not background noise, not the agent's own audio echoing back), stop generating new response text, stop synthesizing new audio, stop playing already-synthesized audio, and start listening, all within a window short enough that the caller doesn't perceive the agent as unresponsive or rude. Production systems target 100-300 ms from caller-speech-onset to agent-audio-stop; anything slower reads as the agent "talking over" the caller even if it eventually yields.

The three failure modes

Too slow to detect speech. If voice activity detection (VAD) waits too long to confirm the caller is actually speaking (as opposed to a cough, a door closing, background chatter), the agent keeps talking for an extra 200-500 ms after the caller starts, which reads as rude. Most VAD models (Silero VAD is the common open-source choice) trade off detection latency against false-positive rate; too aggressive and the agent interrupts itself on background noise, too conservative and it's slow to yield.

Too slow to cancel downstream work. Detecting speech is necessary but not sufficient: the pipeline then has to cancel the in-flight LLM generation and TTS synthesis. If your LLM call and TTS call aren't wired to a shared cancellation signal, the agent detects the interruption correctly but keeps talking anyway because the audio already queued for playback keeps draining. This is the failure mode teams hit most often when hand-rolling a pipeline instead of using a framework's built-in cancellation propagation. The interruption is detected but nothing downstream actually stops.

Wrong sensitivity for the actual conversational cadence. This is the one that's language- and dialect-specific, and the one most turn-detection tuning guides skip because they're written against English test data.

Why Arabic conversational cadence breaks English-tuned turn detectors

Turn-detection models (the ones that decide "has the caller finished their turn" versus "is this just a pause") are typically trained on English speech data and encode assumptions about pause length that don't transfer. Arabic conversational speech, across most dialects, has measurably longer clause-final pauses than English, particularly before a conjunction or when a speaker is composing a longer, more formal sentence. A turn detector tuned to English pause-length thresholds interprets these as "the caller is done" and lets the agent jump in, producing exactly the "talking over me" complaint, except the actual cause is the reverse: the agent isn't waiting long enough.

The fix isn't a single universal threshold swap: dialects differ from each other too (Gulf Arabic conversational cadence and Egyptian colloquial cadence aren't identical), and formality level within a conversation shifts pause length dynamically (a caller reciting an account number pauses differently than one explaining a complaint). Two practical approaches:

  1. Tune the turn-detector's pause threshold against real recorded calls in your target dialect, not a generic Arabic dataset: collect 50-100 real interactions if you can, measure the actual clause-final pause distribution, and set the threshold at the tail of that distribution rather than the English default.
  2. Use backchannel-aware detection: short utterances like "أيوة", "تمام", "hmm" that a caller says while listening (not while taking their turn) shouldn't trigger a full interruption. Both LiveKit and Pipecat expose hooks to classify detected speech as backchannel versus turn-taking before triggering cancellation. This matters more for Arabic than English because backchannel utterances are measurably more frequent in Arabic conversational speech.

What "cancel cleanly" requires at the TTS layer

Even with detection working correctly, the TTS layer has to actually stop within the detection window, and stop cleanly, not mid-phoneme in a way that sounds like a glitch, and not by finishing the current sentence (too slow). The mechanics that make this work:

  • The TTS connection accepts a cancel signal without requiring a reconnect. A TTS that can only be stopped by closing the WebSocket forces the next turn to pay a fresh connection setup cost, degrading the next turn's latency in addition to fixing the current interruption.
  • In-flight audio frames flush cleanly rather than the server continuing to generate frames the client will just discard. Wasted generation still costs GPU time and can create a race where "stop" arrives after several more frames were already queued.
  • The client-side audio buffer empties immediately on cancel rather than draining whatever was already buffered locally; a 200 ms client-side buffer that keeps playing after the server stopped generating adds 200 ms of perceived lag to every interruption.

Hakim's streaming TTS endpoint is built around exactly this contract: cancel signals stop generation within 30-50 ms and the connection stays warm for the next turn without a reconnect. We cover the full architecture in our streaming TTS post.

Testing interruption handling before launch

The mistake most teams make is testing turn-taking with a scripted demo where both sides pause at convenient moments. That validates nothing about production behavior. Before launch:

  1. Record real conversations with native speakers of your target dialect(s) doing the actual task your agent will handle, not reading a script.
  2. Measure clause-final pause length distribution from those recordings and set your turn-detector threshold against it.
  3. Explicitly test backchannel utterances ("أيوة", "تمام", "hmm", "okay") mid-agent-response and verify they don't trigger a false interruption.
  4. Measure end-to-end interruption latency (caller speech onset → agent audio fully stopped) as a single number; anything over 300 ms will read as unresponsive regardless of what's causing it.
  5. Test the next turn's latency after an interruption, not just the interruption itself; a pipeline that reconnects on every cancel pays a hidden latency tax on the turn right after.

If you're building on LiveKit or Pipecat, both frameworks' interruption plumbing (and where to hook in dialect-specific tuning) are covered in our LiveKit and Pipecat integration guides.

Read next