ホーム 車・バイク [Understanding with Manga] What is CER (Character Error Rate)? A Thorough Explanation of Essential Metrics for Speech Recognition and OCR Evaluation

[Understanding with Manga] What is CER (Character Error Rate)? A Thorough Explanation of Essential Metrics for Speech Recognition and OCR Evaluation

真鍋 千夏 真鍋 千夏 • 更新: • 公開: • 読了約 25 分
目次


Purpose of this article

nd50af82af5ff

CER is a metric that represents the accuracy of speech recognition and OCR. While many may have heard of WER (Word Error Rate), CER is often less familiar. In this article, we will explain everything from the definition and calculation method of CER to how to use it alongside WER, as well as representative benchmarks for Japanese, English, and Chinese, at a level applicable to practical work.

Target Audience

  • Engineers who want to know how to evaluate speech recognition models

  • Developers who want to measure the accuracy of OCR systems

  • People who want to correctly interpret benchmark results in papers and technical articles

Learning Objectives

  • Understand the definition and calculation method of CER

  • Grasp the differences between CER and WER and when to use each

  • Know the representative benchmarks for each language

TL;DR

  • CER measures errors at the 'character level,' while WER measures them at the 'word level'

  • The calculation formula is the same: (Substitutions + Deletions + Insertions) / Number of correct characters

  • CER is the standard for Japanese and Chinese (because there are no word boundaries)

  • WER is common for English, but CER is also used in conjunction

  • 1-5% is excellent, while 10% or more leaves room for improvement

What is CER?

CER (Character Error Rate) is a metric used to evaluate the accuracy of Automatic Speech Recognition (ASR) and Optical Character Recognition (OCR).

Let's look at the official definition from Hugging Face.

Source: Hugging Face - CER Metric

In short, it is a numerical value representing how many errors occur when comparing the text output by a system with the correct text 'character by character'.

How to calculate CER

The formula for calculating CER is very simple.

CER = (S + D + I) / N

Where:

  • S (Substitution): Substitution error (replaced with the wrong character)

  • D (Deletion): Deletion error (a character that should be there is missing)

  • I (Insertion): Insertion error (an extra character has been added)

  • N: Total number of characters in the correct text

This calculation uses an algorithm called 'Levenshtein distance' (edit distance). It determines the minimum number of edit operations required to transform one string into another.

Understanding with a concrete example
正解: machine learning
出力: machin lerning

In this case:

  • "e" is deleted (machine → machin): 1 deletion

  • "a" is missing (learning → lerning): 1 deletion

  • Total errors = 2

Number of correct characters = 16 (including spaces)

CER = 2 / 16 = 0.125 = 12.5%
Implementation example in Python
# Levenshteinライブラリを使う方法
from Levenshtein import distance

def calculate_cer(reference, hypothesis):
    edit_distance = distance(reference, hypothesis)
    cer = edit_distance / len(reference)
    return cer
使用例
ref = "machine learning"
hyp = "machin lerning"
cer = calculate_cer(ref, hyp)
print(f"CER: cer:.3f")  # CER: 0.125
PyTorch Metricsを使う方法
from torchmetrics.text import CharErrorRate

cer_metric = CharErrorRate()
references = ["machine learning", "artificial intelligence"]
hypotheses = ["machin lerning", "artifical inteligence"]
cer = cer_metric(hypotheses, references)
print(f"Batch CER: cer.item():.3f")

CER vs WER: How to use them properly

CER and WER are like "relatives." The calculation formula is the same; only the target differs.

Why do CER and WER produce different values?

Let's look at an example.

正解: The cat sat on the mat
出力: The cat sit on the mat

For WER: "sat" → "sit" is a 1-word error. Since it is 1 error out of 6 total words, WER = 16.7%

For CER: "a" → "i" is a 1-character error. Since it is 1 error out of 22 total characters, CER = 4.5%

Even if only one character is wrong, in WER, the "entire word" is counted as an error. Therefore, WER is generally 3 to 5 times higher than CER.

Usage based on language

This is important.

English: WER is mainstream. This is because the concept of a word is clear and they are separated by spaces.

Japanese/Chinese: CER is the standard. This is because there are no word boundaries.

Source: aiOla - Jargonic Japanese ASR

Where to divide the Japanese sentence "今日は良い天気ですね" (Today is nice weather, isn't it) depends on the morphological analyzer. Therefore, word-based WER tends to be unstable. With character-based CER, this problem can be avoided.

The superiority of CER shown by the latest research

The paper "Advocating Character Error Rate for Multilingual ASR Evaluation" (arXiv:2410.07400), published in October 2024, makes an interesting claim.

In this study, human evaluations were conducted in three languages with different morphological characteristics: Malayalam, English, and Arabic. As a result, they reached the conclusion that CER should be prioritized in multilingual ASR evaluation.

CER benchmarks: What is considered good?

Let's provide some practical guidelines.

However, these are just guidelines. They vary significantly depending on the domain, language, and audio quality. It is important to compare them with your company's own baseline.

Benchmarks by Language: Representative Datasets and Scores

From here, we will introduce representative benchmarks and scores for major models in Japanese, English, and Chinese.

Japanese Benchmarks

For Japanese ASR, the following datasets are commonly used.

Representative Datasets

CER Comparison of Major Models

From the ReazonSpeech project paper data:

Source: ReazonSpeech: A Free and Massive Corpus for Japanese ASR

Additionally, the following data is available from Whisper fine-tuning research (arXiv:2412.10705):

What is noteworthy is the point that Whisper-Tiny outperformed Whisper-Base through fine-tuning. Even small models can beat larger models if trained with appropriate data.

Comparison of NeMo Fast Conformer and Whisper

Benchmarks reported in NVIDIA NeMo GitHub Discussion #8473:

In evaluations using the JSUT-book dataset (1 hour of read speech), ReazonSpeech-NeMo v2 shows results that outperform Whisper in both accuracy and speed.

English Benchmarks

In English, WER is primarily used, but CER is also reported as a supplementary metric.

Representative Datasets

WER Comparison on Open ASR Leaderboard (October 2025)

While English is often evaluated using WER, the scores of major models are shown here for reference.

Source: Open ASR Leaderboard (arXiv:2510.06961)

CER on the Libri-Light Dataset

CER is also used in the evaluation of semi-supervised learning.

Source: Libri-Light (arXiv:1912.07875)

Chinese Benchmarks

Like Japanese, Chinese also uses CER as the standard metric.

Representative Datasets

CER Comparison on AISHELL-1

Source:

  • Pinyin-Guided Chinese ASR (Interspeech 2025)

  • LLM-Based ASR on Chinese Open-Source Datasets (arXiv:2405.02132)

What is interesting is that using an LLM as a decoder significantly improves CER. It has dropped from 5.9% with Conformer-AED to 4.0% with LLM + LoRA, and further down to 3.0% when error correction is added.

Furthermore, the following trend has been pointed out in Chinese ASR research:

In other words, LLMs that are better at handling Chinese tend to produce better results in speech recognition as well.

Points to note when using CER

1. Impact of Normalization

CER changes significantly depending on the text normalization method.

  • Whether to include punctuation

  • Whether to count spaces

  • Whether to distinguish between uppercase and lowercase

  • Whether to convert numbers to kanji/alphabet

It is important to clearly define the evaluation protocol and apply it consistently.

2. CER can exceed 100%

If there are many insertion errors, the CER will exceed 100%.

正解: ABC
出力: ABC12345

In this case, 5 insertions / 3 correct characters = 166.67%

To avoid this, there is also a normalization method that sets the denominator to max(N, number of output characters).

3. Cannot capture differences in meaning

If "car" is misrecognized as "scar", it is a one-character error in CER, but the meaning is very different. Conversely, when correcting "procesing" to "processing", the one-character difference has little impact on the meaning.

CER is a mechanical evaluation and does not consider semantic significance. This is the limitation of CER.

Summary

CER (Character Error Rate) is a metric that evaluates the accuracy of speech recognition and OCR on a character-by-character basis.

Key Points:

  • Calculation formula: (Substitutions + Deletions + Insertions) / Number of correct characters

  • CER is standard for Japanese and Chinese (because there are no word boundaries)

  • WER is mainstream for English, but CER is also used in conjunction

  • Recent research suggests that CER correlates more strongly with human evaluation

Benchmarks by Language:

  • Japanese: 8-10% is considered good for JSUT, Common Voice, and ReazonSpeech

  • English: 5-7% WER on LibriSpeech, which is about 1-2% in CER, is state-of-the-art

  • Chinese: 3-5% on AISHELL-1 is competitive

When selecting a model, check not only WER but also CER. Also, be sure to check if it has been evaluated on benchmarks close to your domain and data.

References

  • Hugging Face - CER Metric

  • PyTorch Metrics - CharErrorRate

  • Hugging Face Audio Course - Evaluation Metrics

  • Advocating Character Error Rate for Multilingual ASR Evaluation (arXiv:2410.07400)

  • Open ASR Leaderboard (arXiv:2510.06961)

  • ReazonSpeech: A Free and Massive Corpus for Japanese ASR

  • Efficient Adaptation of Multilingual Models for Japanese ASR (arXiv:2412.10705)

  • Unveiling the Potential of LLM-Based ASR on Chinese Open-Source Datasets (arXiv:2405.02132)

  • Libri-Light: A Benchmark for ASR (arXiv:1912.07875)

  • aiOla - Jargonic Japanese ASR

  • Galileo - Character Error Rate Metric


同じカテゴリの記事

真鍋 千夏
デジタルマーケター 真鍋 千夏
プロフィールを見る →

美容と暮らしの話題を担当。メーカーの公式発表、商品成分の公表資料、専門家の監修記事をもとに事実を整理します。

おすすめの関連記事