Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Realtime: ASR EOU language tags leak into the LLM conversation (unintended reply-language switching)

Open Beginner friendly
#12,748 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@nexxtmobile is already working on this.

Since Oct 17, 2026.

  • #12750 by @nexxtmobile — open

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

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

area/api bug unconfirmed

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

  1. Realtime session with input_audio_transcription on a Nemotron-3.5
    (or similar) backend.
  2. Commit a short ambiguous utterance whose EOU tag does not match the
    conversation language.
  3. 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

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mudler/LocalAI

All issues in mudler/LocalAI

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.