transcription_user_turn_start_strategy
User turn start strategy based on transcriptions.
- class pipecat.turns.user_start.transcription_user_turn_start_strategy.TranscriptionUserTurnStartStrategy(*, use_interim: bool = True, **kwargs)[source]
Bases:
BaseUserTurnStartStrategyUser turn start strategy based on transcriptions.
This strategy signals the start of a user turn when a transcription is received while the bot is speaking. It is useful as a fallback in scenarios where VAD-based detection fails (for example, when the user speaks very softly) but the STT service still produces transcriptions.
- __init__(*, use_interim: bool = True, **kwargs)[source]
Initialize transcription-based user turn start strategy.
- async process_frame(frame: Frame) ProcessFrameResult[source]
Process an incoming frame to detect the start of a user turn.
- Parameters:
frame – The frame to be processed.
- Returns:
STOP if a transcription was received, CONTINUE otherwise.