diff --git a/src/pipecat/transports/base_output.py b/src/pipecat/transports/base_output.py index e6c006145..0ae79b9f0 100644 --- a/src/pipecat/transports/base_output.py +++ b/src/pipecat/transports/base_output.py @@ -208,12 +208,14 @@ class BaseOutputTransport(FrameProcessor): async def _bot_started_speaking(self): if not self._bot_speaking: logger.debug("Bot started speaking") + await self.push_frame(BotStartedSpeakingFrame()) await self.push_frame(BotStartedSpeakingFrame(), FrameDirection.UPSTREAM) self._bot_speaking = True async def _bot_stopped_speaking(self): if self._bot_speaking: logger.debug("Bot stopped speaking") + await self.push_frame(BotStoppedSpeakingFrame()) await self.push_frame(BotStoppedSpeakingFrame(), FrameDirection.UPSTREAM) self._bot_speaking = False @@ -452,6 +454,7 @@ class BaseOutputTransport(FrameProcessor): # it's actually speaking. if isinstance(frame, TTSAudioRawFrame): await self._bot_started_speaking() + await self.push_frame(BotSpeakingFrame()) await self.push_frame(BotSpeakingFrame(), FrameDirection.UPSTREAM) # Also, push frame downstream in case anyone else needs it.