WER
How it works
1) The hypothesis transcript (ASR output) and the reference transcript are normalized (e.g. lowercasing, punctuation removal). 2) The two word sequences are aligned by computing the minimum word-level edit (Levenshtein) distance. 3) Three error types are counted: substitutions (S โ a word replaced by another), deletions (D โ a reference word omitted) and insertions (I โ a word added by the system). 4) The error sum is divided by the number of reference words N: WER = (S + D + I) / N. The metric is based on Levenshtein distance and is normally reported after the same normalization across all compared systems.
Problem solved
An objective, reproducible and cross-model way of measuring speech transcription accuracy is needed. Subjective 'by ear' judgement cannot reliably compare systems or track progress. WER reduces ASR quality to a single number that accounts for three error types โ substitutions, deletions and insertions โ against a reference transcript.
Components
Normalizes hypothesis and reference (lowercasing, punctuation removal, number formatting) before alignment.
Official
Dynamic programming computing the minimum word-level edit distance between hypothesis and reference.
Classifies edit operations into substitutions, deletions and insertions.
Divides the error sum by the reference word count N, giving the result (usually in %).
Implementation
Differing lowercasing / punctuation / number rules make WER non-comparable across systems and papers.
With many insertions the error sum can exceed N; WER is not bounded to [0, 1].
S, D, I are weighted equally regardless of impact on meaning; WER does not capture semantics or word importance.
WER is ill-defined for languages without clear word boundaries (Chinese, Japanese).
Evolution
Vladimir Levenshtein formalizes edit distance (substitutions, deletions, insertions) โ the mathematical basis of WER.
Panayotov et al. (ICASSP 2015) release a large open corpus, standardizing WER reporting (test-clean / test-other).
OpenAI Whisper popularizes zero-shot WER reporting across many languages and acoustic conditions.
Hyperparameters (configurable axes)
Lowercasing, punctuation, number and abbreviation rules; drastically affects the score and comparability.
Level at which errors are counted: words (WER) or characters (CER).
Definition of word boundaries; problematic for languages without spaces (Chinese, Japanese) โ hence CER.
Computational complexity
Time complexity: O(mยทn). Space complexity: O(mยทn).
Compute bottleneck
The quadratic DP alignment dominates cost; negligible for short utterances, noticeable for very long sequences.
Parallelism
Each utterance is scored independently, so a corpus scales embarrassingly in parallel; a single DP alignment is sequential.
Hardware requirements
A pure string operation of negligible cost; computed on CPU, independent of accelerators.