DailyTransport: add transport_source to transcription frames
This commit is contained in:
1
changelog/3257.changed.2.md
Normal file
1
changelog/3257.changed.2.md
Normal file
@@ -0,0 +1 @@
|
||||
- `TranscriptionFrame` and `InterimTranscriptionFrame` produced by `DailyTransport` now include the transport source (i.e., the originating audio track).
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user