From 1d4bab5171ad986cd01e9796df8f40bc661c6e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Sun, 22 Dec 2024 14:35:01 -0800 Subject: [PATCH] transports(base_output): fix duplicate push_frame() --- src/pipecat/transports/base_output.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pipecat/transports/base_output.py b/src/pipecat/transports/base_output.py index 81471dd37..df761ebfd 100644 --- a/src/pipecat/transports/base_output.py +++ b/src/pipecat/transports/base_output.py @@ -242,8 +242,6 @@ async def _sink_frame_handler(self, frame: Frame): await self._set_camera_images(frame.images) elif isinstance(frame, TransportMessageFrame): await self.send_message(frame) - else: - await self.push_frame(frame) async def _sink_clock_task_handler(self): running = True @@ -264,6 +262,9 @@ async def _sink_clock_task_handler(self): await asyncio.sleep(wait_time) await self._sink_frame_handler(frame) + # Also, push frame downstream in case anyone else needs it. + await self.push_frame(frame) + self._sink_clock_queue.task_done() except asyncio.CancelledError: break