DailyTransport: add transport_source to transcription frames

This commit is contained in:
Aleix Conchillo Flaqué
2025-12-17 17:26:15 -08:00
parent fb6c30156a
commit 274db3e05c
2 changed files with 3 additions and 0 deletions

View File

@@ -0,0 +1 @@
- `TranscriptionFrame` and `InterimTranscriptionFrame` produced by `DailyTransport` now include the transport source (i.e., the originating audio track).

View File

@@ -2651,6 +2651,7 @@ class DailyTransport(BaseTransport):
text = message["text"]
timestamp = message["timestamp"]
track_type = message.get("trackType", None)
raw_response = message.get("rawResponse", {})
is_final = raw_response.get("is_final", False)
try:
@@ -2669,6 +2670,7 @@ class DailyTransport(BaseTransport):
language,
result=message,
)
frame.transport_source = track_type
if self._input:
await self._input.push_transcription_frame(frame)