DailyParams: rename to camera/microphone_out_enabled
This commit is contained in:
12
CHANGELOG.md
12
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
|
`TransportParams.video_out_destinations` and the transport should take care of
|
||||||
the rest.
|
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
|
`Frame.transport_source` field which is set by the `BaseInputTransport` if the
|
||||||
incoming data comes from a non-default source (e.g. custom tracks).
|
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
|
each generated `TTSAudioRawFrame`. This allows sending multiple bots' audio to
|
||||||
multiple destinations in the same pipeline.
|
multiple destinations in the same pipeline.
|
||||||
|
|
||||||
- Added `DailyTransportParams.camera_enabled` and
|
- Added `DailyTransportParams.camera_out_enabled` and
|
||||||
`DailyTransportParams.microphone_enabled` which allows you to enable/disable
|
`DailyTransportParams.microphone_out_enabled` which allows you to
|
||||||
the main camera or microphone tracks. This is useful if you only want to use
|
enable/disable the main output camera or microphone tracks. This is useful if
|
||||||
custom tracks and not send the main tracks. Note that you still need
|
you only want to use custom tracks and not send the main tracks. Note that you
|
||||||
`audio_out_enabled=True` or `video_out_enabled`.
|
still need `audio_out_enabled=True` or `video_out_enabled`.
|
||||||
|
|
||||||
- Added `DailyTransport.capture_participant_audio()` which allows you to capture
|
- Added `DailyTransport.capture_participant_audio()` which allows you to capture
|
||||||
an audio source (e.g. "microphone", "screenAudio" or a custom track name) from
|
an audio source (e.g. "microphone", "screenAudio" or a custom track name) from
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ async def main():
|
|||||||
DailyParams(
|
DailyParams(
|
||||||
audio_in_enabled=True,
|
audio_in_enabled=True,
|
||||||
audio_out_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"],
|
audio_out_destinations=["pipecat-mirror"],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ async def main():
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
audio_out_destinations=["spanish", "french", "german"],
|
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(),
|
vad_analyzer=SileroVADAnalyzer(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class BaseInputTransport(FrameProcessor):
|
|||||||
)
|
)
|
||||||
self._params.audio_in_passthrough = True
|
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
|
import warnings
|
||||||
|
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
|
|||||||
@@ -154,8 +154,8 @@ class DailyParams(TransportParams):
|
|||||||
api_url: Daily API base URL
|
api_url: Daily API base URL
|
||||||
api_key: Daily API authentication key
|
api_key: Daily API authentication key
|
||||||
dialin_settings: Optional settings for dial-in functionality
|
dialin_settings: Optional settings for dial-in functionality
|
||||||
camera_enabled: Whether to enable the main camera track
|
camera_out_enabled: Whether to enable the main camera output track. If enabled, it still needs `video_out_enabled=True`
|
||||||
microphone_enabled: Whether to enable the main microphone track
|
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_enabled: Whether to enable speech transcription
|
||||||
transcription_settings: Configuration for transcription service
|
transcription_settings: Configuration for transcription service
|
||||||
"""
|
"""
|
||||||
@@ -163,8 +163,8 @@ class DailyParams(TransportParams):
|
|||||||
api_url: str = "https://api.daily.co/v1"
|
api_url: str = "https://api.daily.co/v1"
|
||||||
api_key: str = ""
|
api_key: str = ""
|
||||||
dialin_settings: Optional[DailyDialinSettings] = None
|
dialin_settings: Optional[DailyDialinSettings] = None
|
||||||
camera_enabled: bool = True
|
camera_out_enabled: bool = True
|
||||||
microphone_enabled: bool = True
|
microphone_out_enabled: bool = True
|
||||||
transcription_enabled: bool = False
|
transcription_enabled: bool = False
|
||||||
transcription_settings: DailyTranscriptionSettings = DailyTranscriptionSettings()
|
transcription_settings: DailyTranscriptionSettings = DailyTranscriptionSettings()
|
||||||
|
|
||||||
@@ -507,8 +507,8 @@ class DailyTransportClient(EventHandler):
|
|||||||
async def _join(self):
|
async def _join(self):
|
||||||
future = self._get_event_loop().create_future()
|
future = self._get_event_loop().create_future()
|
||||||
|
|
||||||
camera_enabled = self._params.video_out_enabled and self._params.camera_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_enabled
|
microphone_enabled = self._params.audio_out_enabled and self._params.microphone_out_enabled
|
||||||
|
|
||||||
self._client.join(
|
self._client.join(
|
||||||
self._room_url,
|
self._room_url,
|
||||||
|
|||||||
Reference in New Issue
Block a user