external_user_turn_completion_stop_strategy

User turn stop strategy that finalizes on UserTurnInferenceCompletedFrame.

class pipecat.turns.user_stop.external_user_turn_completion_stop_strategy.ExternalUserTurnCompletionStopStrategy(*, enable_user_speaking_frames: bool = True, **kwargs)[source]

Bases: BaseUserTurnStopStrategy

Finalize the user turn whenever a UserTurnInferenceCompletedFrame arrives.

Generic stop strategy for pipelines where some external component (LLM with completion markers, STT with built-in turn detection, a dedicated end-of-turn classifier, custom user code, etc.) judges when a turn is semantically complete and emits UserTurnInferenceCompletedFrame.

Pair this with one or more deferred(...)-wrapped detector strategies that drive on_user_turn_inference_triggered but leave finalization to this strategy:

stop=[
    deferred(TurnAnalyzerUserTurnStopStrategy(turn_analyzer=...)),
    ExternalUserTurnCompletionStopStrategy(),
]

For LLM-completion-marker gating specifically, use the subclass LLMTurnCompletionUserTurnStopStrategy instead, which additionally pushes the LLMUpdateSettingsFrame that enables the marker protocol on the LLM.

If the producer never emits UserTurnInferenceCompletedFrame, the controller’s user_turn_stop_timeout watchdog finalizes the turn after no activity. Tune that timeout if your producer can take longer than the default to respond.

async process_frame(frame: Frame) ProcessFrameResult[source]

Fire on_user_turn_stopped whenever UserTurnInferenceCompletedFrame is seen.