From 65afee28082a3b64d9a24290ca0111d500aae350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Tue, 28 May 2024 16:19:15 -0700 Subject: [PATCH] transport(daily): add start_recording, stop_recording and stop_dialout --- CHANGELOG.md | 5 +++++ src/pipecat/transports/services/daily.py | 20 +++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e083a678..9c1727b56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Added Daily transport `start_recording()`, `stop_recording` and + `stop_dialout`. + ### Changed - Added `PipelineParams`. This replaces the `allow_interruptions` argument in diff --git a/src/pipecat/transports/services/daily.py b/src/pipecat/transports/services/daily.py index 7832a1621..6ab2e55ae 100644 --- a/src/pipecat/transports/services/daily.py +++ b/src/pipecat/transports/services/daily.py @@ -345,6 +345,15 @@ class DailyTransportClient(EventHandler): def start_dialout(self, settings): self._client.start_dialout(settings) + def stop_dialout(self, participant_id): + self._client.stop_dialout(participant_id) + + def start_recording(self, streaming_settings, stream_id, force_new): + self._client.start_recording(streaming_settings, stream_id, force_new) + + def stop_recording(self, stream_id): + self._client.stop_recording(stream_id) + def capture_participant_transcription(self, participant_id: str, callback: Callable): if not self._params.transcription_enabled: return @@ -695,9 +704,18 @@ class DailyTransport(BaseTransport): if self._output: await self._output.process_frame(frame, FrameDirection.DOWNSTREAM) - def start_dialout(self, settings): + def start_dialout(self, settings=None): self._client.start_dialout(settings) + def stop_dialout(self, participant_id): + self._client.stop_dialout(participant_id) + + def start_recording(self, streaming_settings=None, stream_id=None, force_new=None): + self._client.start_recording(streaming_settings, stream_id, force_new) + + def stop_recording(self, stream_id=None): + self._client.stop_recording(stream_id) + def capture_participant_transcription(self, participant_id: str): self._client.capture_participant_transcription( participant_id,