Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small bugfix and add asr evaluator to doc #6229

Merged
merged 3 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/source/tools/asr_evaluator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ASR Evaluator
========================

ASR evaluator is a tool for thoroughly evaluating the performance of ASR models and other features such as Voice Activity Detection.

See more details in: https://github.com/NVIDIA/NeMo/tree/stable/tools/asr_evaluator
1 change: 1 addition & 0 deletions docs/source/tools/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ NeMo provides a set of tools useful for developing Automatic Speech Recognitions
ctc_segmentation
speech_data_explorer
comparison_tool
asr_evaluator


There are also additional NeMo-related tools hosted in separate github repositories:
Expand Down
4 changes: 2 additions & 2 deletions nemo/collections/asr/parts/preprocessing/perturb.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ def __init__(
self._audiodataset = AugmentationDataset(manifest_path, audio_tar_filepaths, shuffle_n)
self._data_iterator = iter(self._audiodataset)

self.rng = rng
random.seed(self.rng) if rng else None
self._rng = rng
random.seed(self._rng) if rng else None

def perturb(self, data):
impulse = read_one_audiosegment(
Expand Down
2 changes: 1 addition & 1 deletion tools/asr_evaluator/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def cal_target_metadata_wer(manifest: str, target: str, meta_cfg: DictConfig, ev
raise ValueError("Current only support target metadata belongs to numeric or string ")

for slot_key in slot_wer:
slot_wer[slot_key]['wer'] = slot_wer[slot_key]['errors'] / slot_wer[slot_key]['tokens']
slot_wer[slot_key][eval_metric] = slot_wer[slot_key]['errors'] / slot_wer[slot_key]['tokens']
slot_wer[slot_key]['ins_rate'] = slot_wer[slot_key]['inss'] / slot_wer[slot_key]['tokens']
slot_wer[slot_key]['del_rate'] = slot_wer[slot_key]['dels'] / slot_wer[slot_key]['tokens']
slot_wer[slot_key]['sub_rate'] = slot_wer[slot_key]['subs'] / slot_wer[slot_key]['tokens']
Expand Down