Skip to content

Hotfix: add missing apply_whisper_normalization#1188

Merged
Kipok merged 2 commits intomainfrom
hotfix/audio-evaluator-config
Jan 27, 2026
Merged

Hotfix: add missing apply_whisper_normalization#1188
Kipok merged 2 commits intomainfrom
hotfix/audio-evaluator-config

Conversation

@Jorjeous
Copy link
Member

@Jorjeous Jorjeous commented Jan 27, 2026

add missing apply_whisper_normalization attribute to AudioEvaluator

Summary by CodeRabbit

  • New Features
    • Added a new configuration option for audio evaluation that provides control over Whisper-based normalization. Users can enable or disable this feature as needed; normalization is enabled by default. When disabled, alternate preprocessing modes are applied to evaluation data during scoring.

✏️ Tip: You can customize this high-level summary in your review settings.

…torConfig

Signed-off-by: gzelenfroind <gzelenfroind@nvidia.com>
Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>
@Jorjeous Jorjeous requested review from Kipok and gwarmstrong January 27, 2026 10:50
@Jorjeous
Copy link
Member Author

Some merge conflict was resolved incorrectly, fixing this

@Jorjeous Jorjeous enabled auto-merge (squash) January 27, 2026 10:51
@Jorjeous Jorjeous requested a review from melllinia January 27, 2026 10:51
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

Added a new boolean configuration flag apply_whisper_normalization (default True) to the AudioEvaluatorConfig dataclass. When disabled, this flag causes normalization_mode to be set to "none" during evaluation preprocessing, affecting how ASR-PC and related evaluations handle reference and hypothesis normalization.

Changes

Cohort / File(s) Summary
Audio evaluator configuration
nemo_skills/evaluation/evaluator/audio.py
Added public dataclass field apply_whisper_normalization: bool = True to AudioEvaluatorConfig. Controls whether Whisper-based normalization is applied during ASR evaluation; when False, normalization_mode defaults to "none".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately identifies the main change: adding the missing apply_whisper_normalization attribute to AudioEvaluatorConfig.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 27, 2026

Greptile Overview

Greptile Summary

This PR fixes a bug introduced in PR #1157 where the apply_whisper_normalization attribute was used in the evaluate_sample function but was never defined in the AudioEvaluatorConfig class.

  • Added missing apply_whisper_normalization: bool = True to AudioEvaluatorConfig class definition
  • The attribute is referenced on lines 512, 522, and 529 to control whether Whisper normalization should be applied during ASR evaluation
  • Without this fix, attempting to evaluate audio samples would result in an AttributeError when the config tries to access this undefined attribute
  • The default value of True maintains backward compatibility and expected behavior

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is a simple one-line addition that fixes a clear bug where an attribute was being accessed but never defined. The fix is straightforward, uses the correct type and default value, and aligns perfectly with how the attribute is used throughout the codebase.
  • No files require special attention

Important Files Changed

Filename Overview
nemo_skills/evaluation/evaluator/audio.py Added missing apply_whisper_normalization attribute to AudioEvaluatorConfig - fixes AttributeError when config is accessed in evaluate_sample

Sequence Diagram

sequenceDiagram
    participant Client
    participant AudioEvaluator
    participant AudioEvaluatorConfig
    participant evaluate_sample
    participant evaluate_asr_pc
    
    Client->>AudioEvaluator: eval_single(data_point)
    AudioEvaluator->>AudioEvaluatorConfig: Initialize config
    Note over AudioEvaluatorConfig: apply_whisper_normalization: bool = True
    AudioEvaluator->>evaluate_sample: evaluate_sample(sample, config)
    
    alt task_type == "ASR-PC"
        evaluate_sample->>AudioEvaluatorConfig: config.apply_whisper_normalization
        Note over evaluate_sample: mode = normalization_mode if apply_whisper_normalization else "none"
        evaluate_sample->>evaluate_asr_pc: evaluate_asr_pc(reference, hypothesis, mode)
        evaluate_asr_pc-->>evaluate_sample: metrics
    end
    
    alt task_type == "ASR"
        evaluate_sample->>AudioEvaluatorConfig: config.apply_whisper_normalization
        Note over evaluate_sample: mode = normalization_mode if apply_whisper_normalization else "none"
        evaluate_sample->>evaluate_asr_pc: evaluate_asr(reference, hypothesis, mode)
        evaluate_asr_pc-->>evaluate_sample: metrics
    end
    
    alt task_type == "ASR_LEADERBOARD"
        evaluate_sample->>AudioEvaluatorConfig: config.apply_whisper_normalization
        Note over evaluate_sample: mode = normalization_mode if apply_whisper_normalization else "none"
        evaluate_sample->>evaluate_asr_pc: evaluate_asr(reference, hypothesis, mode)
        evaluate_asr_pc-->>evaluate_sample: metrics
    end
    
    evaluate_sample-->>AudioEvaluator: updates
    AudioEvaluator-->>Client: evaluation results
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Jorjeous Jorjeous changed the title fix: add missing apply_whisper_normalization Hotfix: add missing apply_whisper_normalization Jan 27, 2026
@Kipok Kipok disabled auto-merge January 27, 2026 18:01
@Kipok Kipok merged commit f26c316 into main Jan 27, 2026
5 checks passed
@Kipok Kipok deleted the hotfix/audio-evaluator-config branch January 27, 2026 18:01
dgtm777 pushed a commit that referenced this pull request Mar 18, 2026
Signed-off-by: gzelenfroind <gzelenfroind@nvidia.com>
Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>
dgtm777 pushed a commit that referenced this pull request Mar 18, 2026
Signed-off-by: gzelenfroind <gzelenfroind@nvidia.com>
Signed-off-by: George Zelenfroind <gzelenfroind@nvidia.com>
Signed-off-by: dgitman <dgitman@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants