Overview
User mute strategies control whether incoming user input should be suppressed based on the current system state. They determine when user audio and transcriptions should be muted to prevent interruptions during critical bot operations like initial responses or function calls. By default, user input is never muted. You can configure mute strategies to automatically suppress user input in specific scenarios, such as while the bot is speaking or during function execution. Custom strategies can also be implemented for specific use cases.Configuration
User mute strategies are configured viaLLMUserAggregatorParams when creating an LLMContextAggregatorPair:
Available Strategies
AlwaysUserMuteStrategy
Mutes user input whenever the bot is speaking. This prevents any interruptions during bot speech.- Mutes when
BotStartedSpeakingFrameis received - Unmutes when
BotStoppedSpeakingFrameis received
FirstSpeechUserMuteStrategy
Mutes user input only during the bot’s first speech. After the initial response completes, user input is allowed even while the bot is speaking.- Allows user input before bot speaks
- Mutes during the first bot speech only
- Unmutes permanently after first speech completes
Use this strategy when you want to ensure the bot’s greeting or initial response isn’t interrupted, but allow normal interruptions afterward.
MuteUntilFirstBotCompleteUserMuteStrategy
Mutes user input from the start of the interaction until the bot completes its first speech. This ensures the bot maintains full control at the beginning of a conversation.- Mutes immediately when the pipeline starts (before bot speaks)
- Remains muted until first
BotStoppedSpeakingFrameis received - Unmutes permanently after first speech completes
Unlike
FirstSpeechUserMuteStrategy, this strategy mutes user input even before the bot starts speaking. Use this when you don’t want to process any user input until the bot has delivered its initial message.FunctionCallUserMuteStrategy
Mutes user input while function calls are executing. This prevents user interruptions during potentially long-running tool operations.- Mutes when
FunctionCallsStartedFrameis received - Tracks multiple concurrent function calls
- Unmutes when all function calls complete (via
FunctionCallResultFrameorFunctionCallCancelFrame)
Combining Multiple Strategies
Multiple strategies can be combined in a list. The strategies are combined with OR logic—if any strategy indicates the user should be muted, user input is suppressed.- From pipeline start until the bot completes its first speech
- Whenever function calls are executing (even after first speech)
Usage Examples
Prevent Interruptions During Greeting
Ensure the bot’s greeting plays completely before accepting user input:Mute During Function Calls Only
Allow normal interruptions but prevent them during tool execution:Never Allow Interruptions
Always mute user input while the bot is speaking:Related
- User Turn Strategies - Configure turn detection behavior
- User Input Muting Guide - Guide for controlling user input