Spaces:
Sleeping
Sleeping
update readme
Browse files
README.md
CHANGED
@@ -33,9 +33,7 @@ description: >-
|
|
33 |
performance of the ASR system with a WER of 0 being a perfect score.
|
34 |
---
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
## Metric description
|
39 |
Word error rate (WER) is a common metric of the performance of an automatic speech recognition (ASR) system.
|
40 |
|
41 |
The general difficulty of measuring the performance of ASR systems lies in the fact that the recognized word sequence can have a different length from the reference word sequence (supposedly the correct one). The WER is derived from the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance), working at the word level.
|
@@ -63,94 +61,13 @@ where
|
|
63 |
|
64 |
The metric takes two inputs: references (a list of references for each speech input) and predictions (a list of transcriptions to score).
|
65 |
|
66 |
-
|
67 |
-
```python
|
68 |
-
from evaluate import load
|
69 |
-
wer = load("wer")
|
70 |
-
wer_score = wer.compute(predictions=predictions, references=references)
|
71 |
-
```
|
72 |
-
## Output values
|
73 |
-
|
74 |
-
This metric outputs a float representing the word error rate.
|
75 |
-
|
76 |
-
```
|
77 |
-
print(wer_score)
|
78 |
-
0.5
|
79 |
-
```
|
80 |
-
|
81 |
-
This value indicates the average number of errors per reference word.
|
82 |
-
|
83 |
The **lower** the value, the **better** the performance of the ASR system, with a WER of 0 being a perfect score.
|
84 |
|
85 |
-
### Values from popular papers
|
86 |
-
|
87 |
-
This metric is highly dependent on the content and quality of the dataset, and therefore users can expect very different values for the same model but on different datasets.
|
88 |
-
|
89 |
-
For example, datasets such as [LibriSpeech](https://huggingface.co/datasets/librispeech_asr) report a WER in the 1.8-3.3 range, whereas ASR models evaluated on [Timit](https://huggingface.co/datasets/timit_asr) report a WER in the 8.3-20.4 range.
|
90 |
-
See the leaderboards for [LibriSpeech](https://paperswithcode.com/sota/speech-recognition-on-librispeech-test-clean) and [Timit](https://paperswithcode.com/sota/speech-recognition-on-timit) for the most recent values.
|
91 |
-
|
92 |
-
## Examples
|
93 |
-
|
94 |
-
Perfect match between prediction and reference:
|
95 |
-
|
96 |
-
```python
|
97 |
-
from evaluate import load
|
98 |
-
wer = load("wer")
|
99 |
-
predictions = ["hello world", "good night moon"]
|
100 |
-
references = ["hello world", "good night moon"]
|
101 |
-
wer_score = wer.compute(predictions=predictions, references=references)
|
102 |
-
print(wer_score)
|
103 |
-
0.0
|
104 |
-
```
|
105 |
-
|
106 |
-
Partial match between prediction and reference:
|
107 |
-
|
108 |
-
```python
|
109 |
-
from evaluate import load
|
110 |
-
wer = load("wer")
|
111 |
-
predictions = ["this is the prediction", "there is an other sample"]
|
112 |
-
references = ["this is the reference", "there is another one"]
|
113 |
-
wer_score = wer.compute(predictions=predictions, references=references)
|
114 |
-
print(wer_score)
|
115 |
-
0.5
|
116 |
-
```
|
117 |
-
|
118 |
-
No match between prediction and reference:
|
119 |
-
|
120 |
-
```python
|
121 |
-
from evaluate import load
|
122 |
-
wer = load("wer")
|
123 |
-
predictions = ["hello world", "good night moon"]
|
124 |
-
references = ["hi everyone", "have a great day"]
|
125 |
-
wer_score = wer.compute(predictions=predictions, references=references)
|
126 |
-
print(wer_score)
|
127 |
-
1.0
|
128 |
-
```
|
129 |
|
130 |
## Limitations and bias
|
131 |
|
132 |
WER is a valuable tool for comparing different systems as well as for evaluating improvements within one system. This kind of measurement, however, provides no details on the nature of translation errors and further work is therefore required to identify the main source(s) of error and to focus any research effort.
|
133 |
|
134 |
-
## Citation
|
135 |
-
|
136 |
-
```bibtex
|
137 |
-
@inproceedings{woodard1982,
|
138 |
-
author = {Woodard, J.P. and Nelson, J.T.,
|
139 |
-
year = {1982},
|
140 |
-
journal = {Workshop on standardisation for speech I/O technology, Naval Air Development Center, Warminster, PA},
|
141 |
-
title = {An information theoretic measure of speech recognition performance}
|
142 |
-
}
|
143 |
-
```
|
144 |
-
|
145 |
-
```bibtex
|
146 |
-
@inproceedings{morris2004,
|
147 |
-
author = {Morris, Andrew and Maier, Viktoria and Green, Phil},
|
148 |
-
year = {2004},
|
149 |
-
month = {01},
|
150 |
-
pages = {},
|
151 |
-
title = {From WER and RIL to MER and WIL: improved evaluation measures for connected speech recognition.}
|
152 |
-
}
|
153 |
-
```
|
154 |
|
155 |
## Further References
|
156 |
|
|
|
33 |
performance of the ASR system with a WER of 0 being a perfect score.
|
34 |
---
|
35 |
|
36 |
+
## Word Error Rate (WER)
|
|
|
|
|
37 |
Word error rate (WER) is a common metric of the performance of an automatic speech recognition (ASR) system.
|
38 |
|
39 |
The general difficulty of measuring the performance of ASR systems lies in the fact that the recognized word sequence can have a different length from the reference word sequence (supposedly the correct one). The WER is derived from the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance), working at the word level.
|
|
|
61 |
|
62 |
The metric takes two inputs: references (a list of references for each speech input) and predictions (a list of transcriptions to score).
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
The **lower** the value, the **better** the performance of the ASR system, with a WER of 0 being a perfect score.
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
## Limitations and bias
|
68 |
|
69 |
WER is a valuable tool for comparing different systems as well as for evaluating improvements within one system. This kind of measurement, however, provides no details on the nature of translation errors and further work is therefore required to identify the main source(s) of error and to focus any research effort.
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
## Further References
|
73 |
|