What happens when the user interrupts
When a user turn start strategy triggers withenable_interruptions=True (the default), the user aggregator broadcasts an InterruptionFrame both upstream and downstream through the pipeline. From there:
1
Every processor cancels its current work
InterruptionFrame is a
SystemFrame, so each processor
handles it immediately instead of waiting behind queued frames. Each
processor cancels its processing task and discards queued DataFrames and
ControlFrames. Frames marked uninterruptible (like
FunctionCallResultFrame and EndFrame) are preserved and still processed.2
The LLM stops generating
The in-flight LLM completion is cancelled mid-stream. Any registered
function calls with
cancel_on_interruption=True are cancelled and emit a
FunctionCallCancelFrame. See Function
Calling for details.3
TTS clears its buffers
The TTS service stops synthesizing, clears its text aggregation and word
timestamps, and drops pending output.
4
The transport flushes unplayed audio
The output transport drains its audio queue, discarding audio that was
generated but not yet played. If a background audio mixer is active, the
transport drains only the bot’s speech so the background audio keeps playing
without a gap.
What ends up in the context
A common question: if the bot is cut off mid-sentence, what does the LLM context contain? Only the words that were actually spoken. As the bot speaks, the output transport pushesTTSTextFrames downstream in sync with audio playback. Text that never played never reaches the assistant context aggregator. On interruption, the aggregator commits the partial, spoken-so-far text to the context as the assistant message.
This means the LLM’s next completion sees an accurate transcript of the conversation: the bot’s message ends where the user cut it off, not where the LLM’s generation ended.
You can observe this with the on_assistant_turn_stopped event, which reports the committed text and whether the turn was interrupted:
Controlling interruptions
Let the bot finish speaking with user input muting. Mute strategies block user audio, transcriptions, and interruption signals while active, so speech over the bot is discarded rather than answered later. UseAlwaysUserMuteStrategy to mute whenever the bot is speaking, or FirstSpeechUserMuteStrategy to protect just the introduction:
Triggering an interruption yourself
Sometimes the bot should stop itself: a timeout fires, an external event arrives, or your own logic decides the current response is no longer relevant. From inside a customFrameProcessor, broadcast the interruption directly:
InterruptionWorkerFrame. The pipeline worker converts it into an InterruptionFrame and sends it through the whole pipeline:
Speech-to-speech services
Realtime speech-to-speech services (like Gemini Live and OpenAI Realtime) handle interruption detection on the provider side. In these pipelines, the service emits the speaking events and Pipecat’s aggregators follow along using external turn strategies. The provider decides when the user barged in; Pipecat still flushes local audio output so the bot goes silent right away.Related
- Speech Input & Turn Detection - how user turns are detected
- User Turn Strategies - full strategy reference
- User Input Muting - suppress user input while the bot speaks
- System Frames -
InterruptionFramereference