Skip to content

Commit b921f7a

Browse files
committed
norm for en
Signed-off-by: nithinraok <[email protected]>
1 parent 8cf1d65 commit b921f7a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

nemo_asr/run_eval_ml.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,13 @@ def download_audio_files(batch):
166166
if isinstance(transcriptions, tuple) and len(transcriptions) == 2:
167167
transcriptions = transcriptions[0]
168168

169-
references = all_data["references"]
170-
references = [data_utils.ml_normalizer(ref) for ref in references]
171-
predictions = [data_utils.ml_normalizer(pred.text) for pred in transcriptions]
169+
references = all_data["references"]
170+
if LANGUAGE == "en": # English is handled by the English normalizer
171+
references = [data_utils.normalizer(ref) for ref in references]
172+
predictions = [data_utils.normalizer(pred.text) for pred in transcriptions]
173+
else:
174+
references = [data_utils.ml_normalizer(ref) for ref in references]
175+
predictions = [data_utils.ml_normalizer(pred.text) for pred in transcriptions]
172176

173177
avg_time = total_time / len(all_data["audio_filepaths"])
174178

nemo_asr/run_nemo_ml.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
export PYTHONPATH="..":$PYTHONPATH
88

99
# Configuration
10-
MODEL_ID="nvidia/canary-1b-v2"
10+
MODEL_ID="nvidia/parakeet-tdt-0.6b-v3" #"nvidia/canary-1b-v2"
1111

1212
BATCH_SIZE=64
1313

0 commit comments

Comments
 (0)