Skip to content

Add substitutions option in ASR evaluation#15343

Open
avmonte wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
avmonte:avmonte/hy_liga_subs
Open

Add substitutions option in ASR evaluation#15343
avmonte wants to merge 2 commits intoNVIDIA-NeMo:mainfrom
avmonte:avmonte/hy_liga_subs

Conversation

@avmonte
Copy link

@avmonte avmonte commented Jan 29, 2026

Hi there!

I've been experimenting with Armenian ASR and noticed a consistent evaluation issue: the model never outputs the single-character Armenian և (U+0587). Instead it outputs the decomposed form եւ (two characters). As the ground-truth transcripts contain և, this mismatch inflates WER despite the fact that the predicted text is linguistically equivalent.

This PR adds an evaluation-time normalization option to address that type of issues.

  • Added text_processing.substitutions for evaluation-time text normalization:
    • Format: SRC~DST;SRC2~DST2;...
  • Substitutions are applied to both ground truth and predictions before WER
  • Supports literal Unicode and escaped input like \u0587.

Reproduce

Below is the configuration I used to run my evaluation

python NeMo/examples/asr/speech_to_text_eval.py
dataset_manifest=<path_to_manifest.json>
use_cer=False
only_score_manifest=True
text_processing.punctuation_marks=".,?!։՝՜՞՛«»֊—–-…"
text_processing.separate_punctuation=True
text_processing.do_lowercase=True
text_processing.rm_punctuation=True
text_processing.substitutions="\u0587~եւ"

Evaluation results

Base MCV test WER (from the HF model card): 9.90
Normalized MCV test WER: 5.42

Signed-off-by: avmonte <unstoppablehay@gmail.com>
Signed-off-by: avmonte <unstoppablehay@gmail.com>
@github-actions github-actions bot added the ASR label Jan 29, 2026
@avmonte
Copy link
Author

avmonte commented Jan 29, 2026

@titu1994, @redoctopus, @jbalam-nv, @okuchaiev

Please take a look :)

@chtruong814 chtruong814 added the needs-follow-up Issue needs follow-up label Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants