question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, Thanks for your great repo. I have 2 questions: 1- In the Nemo repo is there any implemented code for calculating the WER (word error rate) for a data set & model’s transcription? (i.e., I mean for example I want to calculate the WER of a trained model on a test set, which I have its ground truth in a text file. So, is there any script in Nemo that I can use it? or I must use other codes such as: jiwer) 2- In the ASR_CTC_Language_Finetuning tutorial, if one enables use_cer (character error rate) parameter, then the tensor board results will be shown the CER instead of WER? (In other words, I have used the use_cer = True, and for example the tensor board showed me the WER of the trained model on epoch=31 on validation set is ~ 0.1028. Now I want to know that it is really WER or it is CER? and if it is CER, how I can calculate the WER of the model on my validation or test set?) val_WER

Best

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
titu1994commented, Dec 12, 2021

For (1), you can use https://github.com/NVIDIA/NeMo/blob/main/examples/asr/transcribe_speech_parallel.py for the time being. We will be refactoring the ASR example scripts in the coming month or two to better support newer model types in a generic way. Or you can use jiwer after computing the transcriptions using the transcribe_speech.py and writing a short script.

For (2), the log name remains the same (*_wer) but in fact it does compute CER and shows the results there. This is obviously confusing, we will improve this to explicitly log CER or WER in the name as well.

If after training, you want to switch batch to wer, you will need to override model._wer.use_cer = False where model is the trained ASR model.

1reaction
titu1994commented, Dec 16, 2021

(2) requires config changes + code changes to every single model, which is why it’s a large and breaking change.

We don’t have confidence interval support on our list, not all models can support it and it’s not a frequent use case

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Calculate Word Error Rate (WER) | Speech to Text Blog
Add up the substitutions, insertions, and deletions, and you get a total of 11. Divide that by 29 (the total number of words...
Read more >
WER | Calculate the Word Error Rate with our Tool - Amberscript
The WER is calculated by comparing only the raw words, ignoring punctuation, line breaks and other formatting of the text using the NIST...
Read more >
Word error rate - Wikipedia
Word error rate (WER) is a common metric of the performance of a speech recognition or machine translation system. The general difficulty of...
Read more >
Two minutes NLP — Intro to Word Error Rate (WER ... - Medium
The WER calculation is based on the Levenshtein distance, which measures the differences between two words. Informally, the Levenshtein distance between two ...
Read more >
How to calculate Word Error Rate(WER) - Example - YouTube
This video is targeted for people who are familiar with speech processing, namely speech recognition, and just want an example to confirm ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found