Compare commits

...

2 Commits

Author SHA1 Message Date
Mark Backman
35c7f13fed Add changelog for #3751 2026-02-14 17:34:46 -05:00
Mark Backman
8d5d8219da Fix RTVIObserver missing transcriptions from Realtime LLMs
Realtime LLMs (OpenAI Realtime, Gemini Live) push TranscriptionFrame
and InterimTranscriptionFrame upstream only, but the RTVIObserver
filtered to downstream-only frames. Allow transcription frames
regardless of direction so user transcriptions are reported to
RTVI clients in all pipeline configurations.
2026-02-14 17:26:38 -05:00
2 changed files with 10 additions and 5 deletions

1
changelog/3751.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed `RTVIObserver` not sending user transcription messages when using Realtime LLMs (OpenAI Realtime, Gemini Live) that push transcription frames upstream.

View File

@@ -1220,11 +1220,15 @@ class RTVIObserver(BaseObserver):
frame = data.frame
direction = data.direction
# Only process downstream frames. Some frames are broadcast in both
# directions (e.g. UserStartedSpeakingFrame, FunctionCallResultFrame),
# and we only want to send one RTVI message per event.
if direction != FrameDirection.DOWNSTREAM:
return
# Many frames are broadcast in both directions (e.g.
# UserStartedSpeakingFrame, FunctionCallResultFrame), so we default
# to only processing downstream copies to avoid duplicate RTVI
# messages. However, some frame types (like transcriptions) may only
# flow upstream (e.g. from Realtime LLMs), so we allow those
# regardless of direction.
if not isinstance(frame, (TranscriptionFrame, InterimTranscriptionFrame)):
if direction != FrameDirection.DOWNSTREAM:
return
# If we have already seen this frame, let's skip it.
if frame.id in self._frames_seen: