ASR language tag parser accepts <unk> as a language
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with extract_lang_tags in src/asr/runner.cpp and check how prompt_languages() exposes the model's supported codes; also inspect asr.tokenizer.vocab and PR #91's parser move to src/asr/language_tags.cpp. Verify how the parser handles <unk> and real language tags, then identify or add a focused test. Done means <unk> is not reported as a language or removed as a language tag, while valid tags still work.
索引モデルが issue の本文から書いたものです。
説明
Problem
The language tag parser accepts any <xx> shape, not only real language codes. The <unk> token matches it, so unk can be reported as a detected language.
The pattern on main (src/asr/runner.cpp, extract_lang_tags):
<([A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,4})?)>
<unk> has three letters, so it matches. The Nemotron 3.5 tokenizer vocabulary (asr.tokenizer.vocab) includes <unk>.
Expected effect
I found this by reading the code. I have not seen the decoder emit <unk> in my test audio, so I do not know how often this can happen.
If the decoder emits <unk> with language auto:
unkgoes intodetected_languages, so results list it inlanguage_codes, in CLIlanguages, and in RESTverbose_jsonlanguagewhen it comes first.build_result_uses the first detected language to select the ITN grammar inautomode, sounkcan replace a real language there.- The token is removed from the transcript, the same as a real tag.
Possible fix
Accept a tag only when its code is in the model's prompt dictionary (asr.rnnt.prompt_dictionary, available through prompt_languages()), instead of matching by shape. A smaller alternative is to exclude <unk> by name.
Related
PR #91 moves this parser to src/asr/language_tags.cpp and keeps the same pattern. It does not fix this.
AI use: Claude Code found this during work on PR #91
- 主要言語
- C++
- スター
- 207
- フォーク
- 47
- 平均マージ
- 13時間 10分
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/NeMo-Speech.cpp のほかの issue
-
難易度 3/5 半日 初心者へのやさしさ 35/100
NVIDIA/NeMo-Speech.cpp#101 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
NVIDIA/NeMo-Speech.cpp#98 ·
メンテナーはふだん 1 日以内に返信
-
Windows: CUDA Backend Fails to Initialize RTX 4050 While Vulkan Backend Works対応中かも @pskrunner14 が 2 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
NVIDIA/NeMo-Speech.cpp#96 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
NVIDIA/NeMo-Speech.cpp#94 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
NVIDIA/NeMo-Speech.cpp#93 ·
メンテナーはふだん 1 日以内に返信
NVIDIA/NeMo-Speech.cpp の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
eclipse-score/lifecycle#929 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
colbymchenry/codegraph#3223 ·
メンテナーはふだん 1 日以内に返信