You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Realtime: ASR EOU language tags leak into the LLM conversation (unintended reply-language switching) #12748
ASR backends like Nemotron-3.5 append end-of-utterance language tags to
transcripts ("Hallo. <en-US>", "I would like to cancel my contract. <en-US> Can you help me with that? <de-DE>").
In the realtime pipeline the committed transcript is used verbatim for the
LLM conversation (the user item's Transcript field, which becomes the user
message in the LLM request). The per-utterance tag is unreliable for short
or ambiguous utterances (a German "Hallo." is tagged <en-US>; the same
uplink clip transcribes as "My name is Benjamin Zimmer. <en-US>" in one
run and "Mein Name ist Benjamin Zimmer. <de-DE>" in another). LLMs treat
the tag as a language signal and switch the reply language against the
session instructions — observed: a German call where the caller says
"Hallo" (tagged <en-US>) gets the reply "Hello. What is your phone number?".
Reproduction
Realtime session with input_audio_transcription on a Nemotron-3.5
(or similar) backend.
Commit a short ambiguous utterance whose EOU tag does not match the
conversation language.
The LLM reply switches language (or the reply behavior becomes
tag-dependent), even though the instruction is to keep the conversation
language.
Proposed fix
Strip the EOU language tags from the transcript that goes to appendUserItem/generateResponse (the LLM context). The emitted input_audio_transcription event keeps the raw transcript (debugging /
client display). PR follows.
Activity