transport(daily): add start_recording, stop_recording and stop_dialout

This commit is contained in:
Aleix Conchillo Flaqué
2024-05-28 16:19:15 -07:00
parent 00ece864ec
commit 65afee2808
2 changed files with 24 additions and 1 deletions

View File

@@ -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

View File

@@ -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,