diff --git a/changelog/3297.deprecated.2.md b/changelog/3297.deprecated.2.md new file mode 100644 index 000000000..49d5723af --- /dev/null +++ b/changelog/3297.deprecated.2.md @@ -0,0 +1 @@ +- `FrameProcessor.interruptions_allowed` is now deprecated, use `LLMUserAggregator`'s new parameter `user_mute_strategies` instead. diff --git a/src/pipecat/processors/frame_processor.py b/src/pipecat/processors/frame_processor.py index 168bae91a..0a7e2751e 100644 --- a/src/pipecat/processors/frame_processor.py +++ b/src/pipecat/processors/frame_processor.py @@ -319,9 +319,23 @@ class FrameProcessor(BaseObject): 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 diff --git a/src/pipecat/transports/base_output.py b/src/pipecat/transports/base_output.py index b2815b2c6..bc0eb9d6b 100644 --- a/src/pipecat/transports/base_output.py +++ b/src/pipecat/transports/base_output.py @@ -505,10 +505,12 @@ class BaseOutputTransport(FrameProcessor): await self._cancel_audio_task() await self._cancel_clock_task() await self._cancel_video_task() + # Create tasks. self._create_video_task() self._create_clock_task() self._create_audio_task() + # Let's send a bot stopped speaking if we have to. await self._bot_stopped_speaking()