Realtime: ASR EOU language tags leak into the LLM conversation (unintended reply-language switching)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go
- Domain
- backend-api-design
Research direction
Trace the realtime pipeline from the committed user transcript to appendUserItem/generateResponse, and compare it with the input_audio_transcription event path. Keep the event's raw transcript unchanged while ensuring EOU language tags are absent from the transcript used for the LLM context; verify with a short utterance carrying a mismatched tag.
Written by the indexing model from the issue text.
Description
Bug
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_transcriptionon 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.
- Dominant language
- Go
- Stars
- 49.5k
- Forks
- 4.5k
- Avg merge
- 20h 52m
- Merged PRs (30d)
- 367
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mudler/LocalAI
-
Open Responses API doesn't accept "output_text" as an input ItemPossibly taken @localai-org-maint-bot claimed this 22 days ago. Openbug unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
mudler/LocalAI#12337 · 1 comment ·
Maintainers usually reply within 1 day
-
Gallery model audio-cpp-sortformer-diarization fails to install: SHA mismatch, reproducible across retriesMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mudler/LocalAI#11995 · 1 comment ·
Maintainers usually reply within 1 day
-
Agent pool Postgres DSN is logged in cleartext, including the password, while the auth DSN is redactedPossibly taken @localai-org-maint-bot claimed this 38 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mudler/LocalAI#11991 · 1 comment ·
Maintainers usually reply within 1 day
-
fish-speech: make compile:true usable on Blackwell sm_121 by honouring the CUDA toolkit's ptxasMay be free again A pull request for this issue was closed without being merged. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mudler/LocalAI#11348 · 1 comment ·
Maintainers usually reply within 1 day
-
Realtime: committed-utterance WAV written with fixed 16 kHz header breaks 24 kHz client commits (empty STT -> input_not_committed -> total silence)Possibly taken @nexxtmobile claimed this 3 days ago. Openarea/api bug confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
Maintainers usually reply within 1 day
Similar issues
-
automation models
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
QuantumNous/new-api#7930 ·
Maintainers usually reply within 1 day
-
area/gateway kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
vllm-project/aibrix#3226 · 1 comment ·
Maintainers usually reply within 1 day
-
kind/bug kind/flake
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
kubernetes-sigs/kueue#17518 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day