Merge pull request #1732 from pipecat-ai/aleix/daily-remote-custom-tracks

DailyTransport: remove custom tracks before leaving
This commit is contained in:
Aleix Conchillo Flaqué
2025-05-05 08:44:11 -07:00
committed by GitHub
2 changed files with 16 additions and 0 deletions

View File

@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support to `RimeHttpTTSService` for the `arcana` model.
### Fixed
- Remove custom audio tracks from `DailyTransport` before leaving.
## [0.0.66] - 2025-05-02
### Added

View File

@@ -578,6 +578,10 @@ class DailyTransportClient(EventHandler):
if self._params.transcription_enabled:
await self._stop_transcription()
# Remove any custom tracks, if any.
for track_name, _ in self._audio_sources.items():
await self.remove_custom_audio_track(track_name)
try:
error = await self._leave()
if not error:
@@ -741,6 +745,14 @@ class DailyTransportClient(EventHandler):
return audio_source
async def remove_custom_audio_track(self, track_name: str):
future = self._get_event_loop().create_future()
self._client.remove_custom_audio_track(
track_name=track_name,
completion=completion_callback(future),
)
await future
async def update_transcription(self, participants=None, instance_id=None):
future = self._get_event_loop().create_future()
self._client.update_transcription(