types
Shared types for user turn strategy frame processing.
- class pipecat.turns.types.ProcessFrameResult(*values)[source]
Bases:
EnumResult of processing a frame in a user turn strategy.
Controls whether the strategy loop in the controller continues to the next strategy or stops early.
- Parameters:
CONTINUE – Continue to the next strategy in the loop.
STOP – Stop evaluating further strategies for this frame.
Deprecated since version 1.15.0: Use
StrategyModeinstead. Every strategy sees every frame, and a list whose strategies all have to agree, such as a wake phrase next to VAD, isStrategyMode.ALL. Will be removed in 2.0.0.- CONTINUE = 'continue'
- STOP = 'stop'
- class pipecat.turns.types.UserTurnSpeculation(text: str, perception: list[PerceptionSignal] | None = None)[source]
Bases:
objectA speculative inference a stop strategy has in flight.
Produced from an eager end of turn: the turn is not over yet, so the inference runs against a provisional context and its response is held back until the turn is confirmed.
- Parameters:
text – The text the service predicted, covering the speech since it last committed a transcript.
perception – How the user said it, as read at the eager end of turn, or None. Part of expressive conversation (alpha).
- perception: list[PerceptionSignal] | None = None
- class pipecat.turns.types.UserTurnResumedParams(enable_interruptions: bool, inference_triggered: bool)[source]
Bases:
objectParameters emitted when the user speaks again in an open turn.
- Parameters:
enable_interruptions – Whether the turn interrupts the bot, as decided when it started.
inference_triggered – Whether the turn’s inference was already triggered. The new speech voids the answer it started.