From 750e79c1cea0f7af8001ca1eac90134240bda730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 1 May 2025 19:10:30 -0700 Subject: [PATCH] DailyParams: rename to camera/microphone_out_enabled --- CHANGELOG.md | 12 ++++++------ examples/daily-custom-tracks/bot.py | 2 +- examples/daily-multi-translation/bot.py | 2 +- src/pipecat/transports/base_input.py | 2 +- src/pipecat/transports/services/daily.py | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7925b5b38..a95115a53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `TransportParams.video_out_destinations` and the transport should take care of the rest. -- Similarly to the new `Frame.transport_destination`, there's a new +- Similar to the new `Frame.transport_destination`, there's a new `Frame.transport_source` field which is set by the `BaseInputTransport` if the incoming data comes from a non-default source (e.g. custom tracks). @@ -28,11 +28,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 each generated `TTSAudioRawFrame`. This allows sending multiple bots' audio to multiple destinations in the same pipeline. -- Added `DailyTransportParams.camera_enabled` and - `DailyTransportParams.microphone_enabled` which allows you to enable/disable - the main camera or microphone tracks. This is useful if you only want to use - custom tracks and not send the main tracks. Note that you still need - `audio_out_enabled=True` or `video_out_enabled`. +- Added `DailyTransportParams.camera_out_enabled` and + `DailyTransportParams.microphone_out_enabled` which allows you to + enable/disable the main output camera or microphone tracks. This is useful if + you only want to use custom tracks and not send the main tracks. Note that you + still need `audio_out_enabled=True` or `video_out_enabled`. - Added `DailyTransport.capture_participant_audio()` which allows you to capture an audio source (e.g. "microphone", "screenAudio" or a custom track name) from diff --git a/examples/daily-custom-tracks/bot.py b/examples/daily-custom-tracks/bot.py index 9792f17c6..17d0e2dfa 100644 --- a/examples/daily-custom-tracks/bot.py +++ b/examples/daily-custom-tracks/bot.py @@ -53,7 +53,7 @@ async def main(): DailyParams( audio_in_enabled=True, audio_out_enabled=True, - microphone_enabled=False, # Disable since we just use custom tracks + microphone_out_enabled=False, # Disable since we just use custom tracks audio_out_destinations=["pipecat-mirror"], ), ) diff --git a/examples/daily-multi-translation/bot.py b/examples/daily-multi-translation/bot.py index 4c184062c..5f5037584 100644 --- a/examples/daily-multi-translation/bot.py +++ b/examples/daily-multi-translation/bot.py @@ -57,7 +57,7 @@ async def main(): ), }, audio_out_destinations=["spanish", "french", "german"], - microphone_enabled=False, # Disable since we just use custom tracks + microphone_out_enabled=False, # Disable since we just use custom tracks vad_analyzer=SileroVADAnalyzer(), ), ) diff --git a/src/pipecat/transports/base_input.py b/src/pipecat/transports/base_input.py index acb0058c6..51ebdb677 100644 --- a/src/pipecat/transports/base_input.py +++ b/src/pipecat/transports/base_input.py @@ -79,7 +79,7 @@ class BaseInputTransport(FrameProcessor): ) self._params.audio_in_passthrough = True - if self._params.camera_in_enabled or self._params.camera_out_enabled: + if self._params.camera_in_enabled: import warnings with warnings.catch_warnings(): diff --git a/src/pipecat/transports/services/daily.py b/src/pipecat/transports/services/daily.py index 844a801c5..08a2a6030 100644 --- a/src/pipecat/transports/services/daily.py +++ b/src/pipecat/transports/services/daily.py @@ -154,8 +154,8 @@ class DailyParams(TransportParams): api_url: Daily API base URL api_key: Daily API authentication key dialin_settings: Optional settings for dial-in functionality - camera_enabled: Whether to enable the main camera track - microphone_enabled: Whether to enable the main microphone track + camera_out_enabled: Whether to enable the main camera output track. If enabled, it still needs `video_out_enabled=True` + microphone_out_enabled: Whether to enable the main microphone track. If enabled, it still needs `audio_out_enabled=True` transcription_enabled: Whether to enable speech transcription transcription_settings: Configuration for transcription service """ @@ -163,8 +163,8 @@ class DailyParams(TransportParams): api_url: str = "https://api.daily.co/v1" api_key: str = "" dialin_settings: Optional[DailyDialinSettings] = None - camera_enabled: bool = True - microphone_enabled: bool = True + camera_out_enabled: bool = True + microphone_out_enabled: bool = True transcription_enabled: bool = False transcription_settings: DailyTranscriptionSettings = DailyTranscriptionSettings() @@ -507,8 +507,8 @@ class DailyTransportClient(EventHandler): async def _join(self): future = self._get_event_loop().create_future() - camera_enabled = self._params.video_out_enabled and self._params.camera_enabled - microphone_enabled = self._params.audio_out_enabled and self._params.microphone_enabled + camera_enabled = self._params.video_out_enabled and self._params.camera_out_enabled + microphone_enabled = self._params.audio_out_enabled and self._params.microphone_out_enabled self._client.join( self._room_url,