diff --git a/src/pipecat/frames/frames.py b/src/pipecat/frames/frames.py index bf5319405..f3e8a3ad9 100644 --- a/src/pipecat/frames/frames.py +++ b/src/pipecat/frames/frames.py @@ -878,11 +878,6 @@ class StartFrame(SystemFrame): Parameters: audio_in_sample_rate: Input audio sample rate in Hz. audio_out_sample_rate: Output audio sample rate in Hz. - allow_interruptions: Whether to allow user interruptions. - - .. deprecated:: 0.0.99 - Use `LLMUserAggregator`'s new `user_mute_strategies` parameter instead. - enable_metrics: Whether to enable performance metrics collection. enable_tracing: Whether to enable OpenTelemetry tracing. enable_usage_metrics: Whether to enable usage metrics collection. @@ -897,7 +892,6 @@ class StartFrame(SystemFrame): audio_in_sample_rate: int = 16000 audio_out_sample_rate: int = 24000 - allow_interruptions: bool = False enable_metrics: bool = False enable_tracing: bool = False enable_usage_metrics: bool = False diff --git a/src/pipecat/pipeline/task.py b/src/pipecat/pipeline/task.py index e5a6ad7ff..f3e7804f6 100644 --- a/src/pipecat/pipeline/task.py +++ b/src/pipecat/pipeline/task.py @@ -111,11 +111,6 @@ class PipelineParams(BaseModel): constructor arguments instead. Parameters: - allow_interruptions: Whether to allow pipeline interruptions. - - .. deprecated:: 0.0.99 - Use `LLMUserAggregator`'s new `user_turn_strategies` parameter instead. - audio_in_sample_rate: Input audio sample rate in Hz. audio_out_sample_rate: Output audio sample rate in Hz. enable_heartbeats: Whether to enable heartbeat monitoring. @@ -136,7 +131,6 @@ class PipelineParams(BaseModel): model_config = ConfigDict(arbitrary_types_allowed=True) - allow_interruptions: bool = True audio_in_sample_rate: int = 16000 audio_out_sample_rate: int = 24000 enable_heartbeats: bool = False @@ -778,7 +772,6 @@ class PipelineTask(BasePipelineTask): self._maybe_start_idle_task() start_frame = StartFrame( - allow_interruptions=self._params.allow_interruptions, audio_in_sample_rate=self._params.audio_in_sample_rate, audio_out_sample_rate=self._params.audio_out_sample_rate, enable_metrics=self._params.enable_metrics, diff --git a/src/pipecat/processors/aggregators/llm_response_universal.py b/src/pipecat/processors/aggregators/llm_response_universal.py index 605db31f6..f8c2ffd43 100644 --- a/src/pipecat/processors/aggregators/llm_response_universal.py +++ b/src/pipecat/processors/aggregators/llm_response_universal.py @@ -731,7 +731,7 @@ class LLMUserAggregator(LLMContextAggregator): await self._user_idle_controller.process_frame(UserStartedSpeakingFrame()) - if params.enable_interruptions and self._allow_interruptions: + if params.enable_interruptions: await self.broadcast_interruption() await self._call_event_handler("on_user_turn_started", strategy) diff --git a/src/pipecat/processors/frame_processor.py b/src/pipecat/processors/frame_processor.py index 29b613527..3fe31ec01 100644 --- a/src/pipecat/processors/frame_processor.py +++ b/src/pipecat/processors/frame_processor.py @@ -193,8 +193,6 @@ class FrameProcessor(BaseObject): self._enable_metrics = False self._enable_usage_metrics = False self._report_only_initial_ttfb = False - # Other properties (deprecated) - self._allow_interruptions = False self._interruption_strategies: List[BaseInterruptionStrategy] = [] # Indicates whether we have received the StartFrame. @@ -307,29 +305,6 @@ class FrameProcessor(BaseObject): """ return self._prev - @property - def interruptions_allowed(self): - """Check if interruptions are allowed for this processor. - - .. deprecated:: 0.0.99 - Use `LLMUserAggregator`'s new `user_mute_strategies` parameter instead. - - Returns: - True if interruptions are allowed. - """ - import warnings - - with warnings.catch_warnings(): - warnings.simplefilter("always") - warnings.warn( - "`FrameProcessor.interruptions_allowed` is deprecated. " - "Use `LLMUserAggregator`'s new `user_mute_strategies` parameter instead.", - DeprecationWarning, - stacklevel=2, - ) - - return self._allow_interruptions - @property def metrics_enabled(self): """Check if metrics collection is enabled. @@ -819,7 +794,6 @@ class FrameProcessor(BaseObject): frame: The start frame containing initialization parameters. """ self.__started = True - self._allow_interruptions = frame.allow_interruptions self._enable_metrics = frame.enable_metrics self._enable_usage_metrics = frame.enable_usage_metrics self._interruption_strategies = frame.interruption_strategies diff --git a/src/pipecat/transports/base_input.py b/src/pipecat/transports/base_input.py index d4a1241f3..ff7026673 100644 --- a/src/pipecat/transports/base_input.py +++ b/src/pipecat/transports/base_input.py @@ -518,7 +518,7 @@ class BaseInputTransport(FrameProcessor): ) # Make sure we notify about interruptions quickly out-of-band. - if should_push_immediate_interruption and self._allow_interruptions: + if should_push_immediate_interruption: await self.broadcast_interruption() elif self.interruption_strategies and self._bot_speaking: logger.debug( diff --git a/src/pipecat/transports/base_output.py b/src/pipecat/transports/base_output.py index 01af97be8..1d26d5e53 100644 --- a/src/pipecat/transports/base_output.py +++ b/src/pipecat/transports/base_output.py @@ -517,9 +517,6 @@ class BaseOutputTransport(FrameProcessor): Args: _: The start interruption frame (unused). """ - if not self._transport._allow_interruptions: - return - # Cancel tasks. await self._cancel_audio_task() await self._cancel_clock_task() diff --git a/src/pipecat/turns/user_turn_processor.py b/src/pipecat/turns/user_turn_processor.py index 85bc658dd..a3501d2c8 100644 --- a/src/pipecat/turns/user_turn_processor.py +++ b/src/pipecat/turns/user_turn_processor.py @@ -181,7 +181,7 @@ class UserTurnProcessor(FrameProcessor): await self._user_idle_controller.process_frame(UserStartedSpeakingFrame()) - if params.enable_interruptions and self._allow_interruptions: + if params.enable_interruptions: await self.broadcast_interruption() await self._call_event_handler("on_user_turn_started", strategy)