Skip to main content

Overview

In conversational applications, there are moments when you don’t want to process user speech, such as during bot introductions or while executing function calls. Pipecat’s user mute strategies let you selectively “mute” user input based on different conversation states.

When to Use Mute Strategies

Common scenarios for muting user input include:
  • During introductions: Prevent the bot from being interrupted during its initial greeting
  • While processing functions: Block input while the bot is retrieving external data
  • During bot speech: Reduce false transcriptions while the bot is speaking
  • For guided conversations: Create more structured interactions with clear turn-taking

How It Works

User mute strategies work by blocking specific user-related frames from flowing through your pipeline. When muted, the following frames are filtered:
  • Voice activity detection (VAD) events
  • Interruption signals
  • Raw audio input frames
  • Transcription frames (both interim and final)
This prevents user speech from being processed during muted periods.
Mute strategies are configured on the LLMUserAggregator via the user_mute_strategies parameter.

Mute Strategies

Pipecat provides several built-in strategies for determining when to mute user input:

FirstSpeechUserMuteStrategy

Mute only during the bot’s first speech utterance. Useful for introductions when you want the bot to complete its greeting before the user can speak.

MuteUntilFirstBotCompleteUserMuteStrategy

Start muted and remain muted until the first bot utterance completes. Ensures the bot’s initial instructions are fully delivered.

FunctionCallUserMuteStrategy

Mute during function calls. Prevents users from speaking while the bot is processing external data requests.

AlwaysUserMuteStrategy

Mute whenever the bot is speaking. Creates a strict turn-taking conversation pattern.
The FirstSpeechUserMuteStrategy and MuteUntilFirstBotCompleteUserMuteStrategy strategies should not be used together as they handle the first bot speech differently.

Basic Implementation

Import and configure the mute strategies you need:
from pipecat.processors.aggregators.llm_response_universal import (
    LLMContextAggregatorPair,
    LLMUserAggregatorParams,
)
from pipecat.turns.mute import AlwaysUserMuteStrategy

# Configure with one or more strategies
user_aggregator, assistant_aggregator = LLMContextAggregatorPair(
    context,
    user_params=LLMUserAggregatorParams(
        user_mute_strategies=[AlwaysUserMuteStrategy()],
    ),
)

Combining Multiple Strategies

Multiple strategies can be combined. They use OR logic—if any strategy indicates the user should be muted, input is suppressed:
from pipecat.processors.aggregators.llm_response_universal import (
    LLMContextAggregatorPair,
    LLMUserAggregatorParams,
)

from pipecat.turns.mute import (
    MuteUntilFirstBotCompleteUserMuteStrategy,
    FunctionCallUserMuteStrategy,
)

user_aggregator, assistant_aggregator = LLMContextAggregatorPair(
    context,
    user_params=LLMUserAggregatorParams(
        user_mute_strategies=[
            MuteUntilFirstBotCompleteUserMuteStrategy(),  # Mute until first response
            FunctionCallUserMuteStrategy(),               # Mute during function calls
        ],
    ),
)

Best Practices

  • Choose strategies wisely: Select the minimal set of strategies needed for your use case
  • Test user experience: Excessive muting can frustrate users; balance control with usability
  • Consider feedback: Provide visual cues when the user is muted to improve the experience

Next Steps

Experiment with different muting strategies to find the right balance for your application.