WordErrorRate
Models & Types · AiDotNet.Metrics
Word Error Rate (WER) metric for speech recognition evaluation.
How It Works
WER measures the accuracy of automatic speech recognition (ASR) systems by computing the edit distance between the predicted transcription and the reference transcription.
Formula: WER = (Substitutions + Insertions + Deletions) / Number of words in reference
Typical WER values:
- <5%: Excellent (human-level performance)
- 5-10%: Very good
- 10-20%: Good
- 20-30%: Acceptable
-
30%: Poor
Constructors
| Constructor | Summary |
|---|---|
WordErrorRate() |
Methods
| Method | Summary |
|---|---|
ValueTuple<double, int, int, int, int> ComputeDetailed(string hypothesis, string reference) |
Computes detailed error statistics including substitutions, insertions, and deletions. |
double Compute(string hypothesis, string reference) |
Computes the Word Error Rate between a hypothesis and reference transcription. |
double ComputeBatch(string[] hypotheses, string[] references) |
Computes WER for a batch of hypothesis-reference pairs. |