Configure when users can interrupt the bot to prevent unwanted interruptions from brief affirmations
interruption_strategies
parameter in PipelineParams
. When specified, the normal immediate interruption behavior is replaced with conditional interruption based on your criteria.
BaseInterruptionStrategy
, which provides a common interface for evaluating interruption conditions.
True
triggers interruptionInputAudioRawFrame
) are fed to append_audio()
append_text()
Scenario | Without Strategy | With MinWordsInterruptionStrategy(min_words=3) |
---|---|---|
User says “okay” while bot speaks | ✅ Interrupts immediately | ❌ Ignored (only 1 word) |
User says “yes that’s right” while bot speaks | ✅ Interrupts immediately | ✅ Interrupts (3 words) |
User speaks while bot is silent | ✅ Processed immediately | ✅ Processed immediately |
allow_interruptions
parameter must be True
for interruption strategies to work