From d28e3881a760f92f58b0cda753e698f292ef0a90 Mon Sep 17 00:00:00 2001 From: Chad Bailey Date: Fri, 19 Sep 2025 18:04:13 +0000 Subject: [PATCH] add remote participant updates to DailyTransport --- src/pipecat/transports/daily/transport.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/pipecat/transports/daily/transport.py b/src/pipecat/transports/daily/transport.py index 1568a12bd..ae7bf53dc 100644 --- a/src/pipecat/transports/daily/transport.py +++ b/src/pipecat/transports/daily/transport.py @@ -41,6 +41,7 @@ from pipecat.frames.frames import ( UserAudioRawFrame, UserImageRawFrame, UserImageRequestFrame, + DataFrame, ) from pipecat.processors.frame_processor import FrameDirection, FrameProcessorSetup from pipecat.transcriptions.language import Language @@ -104,6 +105,15 @@ class DailyInputTransportMessageUrgentFrame(InputTransportMessageUrgentFrame): participant_id: Optional[str] = None +@dataclass +class DailyUpdateRemoteParticipantsFrame(DataFrame): + """Frame to update remote participants in Daily calls. + + Parameters: + remote_participants: See https://reference-python.daily.co/api_reference.html#daily.CallClient.update_remote_participants. + """ + + remote_participants: Optional[Any] = None class WebRTCVADAnalyzer(VADAnalyzer): """Voice Activity Detection analyzer using WebRTC. @@ -1784,6 +1794,19 @@ class DailyOutputTransport(BaseOutputTransport): await super().cancel(frame) # Leave the room. await self._client.leave() + + async def process_frame(self, frame: Frame, direction: FrameDirection): + """Process outgoing frames, including transport messages. + + Args: + frame: The frame to process. + direction: The direction of frame flow in the pipeline. + """ + await super().process_frame(frame, direction) + + if isinstance(frame, DailyUpdateRemoteParticipantsFrame): + logger.debug(f"Got a DailyUpdateRemoteParticipantsFrame: {frame}") + await self._client.update_remote_participants(frame.remote_participants) async def send_message(self, frame: TransportMessageFrame | TransportMessageUrgentFrame): """Send a transport message to participants.