From ecf878e14d1deeba94b5269d581045be4b934837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Sun, 25 May 2025 01:24:49 -0700 Subject: [PATCH] DailyTransport: allow requesting video frames with any framerate --- CHANGELOG.md | 3 +++ src/pipecat/transports/services/daily.py | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2830b1240..af51fa998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -151,6 +151,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed a `DailyTransport` issue that was not allow capturing video frames if + framerate was greater than zero. + - Fixed a `DeegramSTTService` connection issue when the user provided their own `LiveOptions`. diff --git a/src/pipecat/transports/services/daily.py b/src/pipecat/transports/services/daily.py index 7fe3ed0dd..03d9e14ca 100644 --- a/src/pipecat/transports/services/daily.py +++ b/src/pipecat/transports/services/daily.py @@ -695,7 +695,9 @@ class DailyTransportClient(EventHandler): self._audio_renderers.setdefault(participant_id, {})[audio_source] = callback - logger.info(f"Starting to capture [{audio_source}] audio from participant {participant_id}") + logger.debug( + f"Starting to capture [{audio_source}] audio from participant {participant_id}" + ) self._client.set_audio_renderer( participant_id, @@ -723,6 +725,10 @@ class DailyTransportClient(EventHandler): self._video_renderers.setdefault(participant_id, {})[video_source] = callback + logger.debug( + f"Starting to capture [{video_source}] video from participant {participant_id}" + ) + self._client.set_video_renderer( participant_id, self._video_frame_received, @@ -1106,7 +1112,7 @@ class DailyInputTransport(BaseInputTransport): next_time = prev_time + 1 / framerate render_frame = (next_time - curr_time) < 0.1 - elif self._video_renderers[participant_id][video_source]["render_next_frame"]: + if self._video_renderers[participant_id][video_source]["render_next_frame"]: request_frame = self._video_renderers[participant_id][video_source][ "render_next_frame" ].pop(0)