first_speech_user_mute_strategy

User mute strategy that mutes the user only during the bot’s first speech.

class pipecat.turns.user_mute.first_speech_user_mute_strategy.FirstSpeechUserMuteStrategy[source]

Bases: BaseUserMuteStrategy

User mute strategy that mutes the user only during the bot’s first speech.

This strategy allows user input before the bot starts speaking. Once the bot begins its first speaking turn, user frames are muted until the bot finishes that speech. After the bot completes its first speaking turn, user input is no longer muted by this strategy.

Use this strategy when early user input is acceptable, but interruptions during the bot’s initial response should be prevented.

__init__()[source]

Initialize the first-bot-speech user mute strategy.

async process_frame(frame: Frame) bool[source]

Process an incoming frame.

Parameters:

frame – The frame to be processed.

Returns:

Whether the strategy is muted.