AI Logic

Datasets and Benchmarks

ReazonSpeech

Updated:

How ReazonSpeech is built and organized. Left: the pipeline that takes audio and subtitles from recorded One-Seg broadcasts, extracts segments extended before the subtitle timestamps, aligns subtitle text to audio with CTC segmentation, keeps only utterances with a character error rate of 0.33 or less, and repeatedly retrains the recognition model on the kept utterances to produce ReazonSpeech. Right: sizes by version and the five splits, the format of one utterance, and the audio format, transcription, and evaluation rules.

Overview

ReazonSpeech is a large-scale Japanese speech recognition corpus built by automatically matching the audio and subtitles of Japanese TV broadcasts. A research team at Reazon Holdings, Inc. created it and presented it at the 2023 Annual Meeting of the Association for Natural Language Processing (Japan). The first release was about 15,000 hours, and it has kept growing; the February 2024 release (v2.0) reached about 35,000 hours. The audio is 16 kHz and is distributed on Hugging Face.

It was created because, compared with English, Japanese had few large, freely usable speech recognition corpora. Human-transcribed corpora are high quality, but they take a great deal of effort to build and cannot be made large. ReazonSpeech therefore uses the subtitles attached to many programs in place of transcripts. Subtitles cannot be used as they are, however.

  • Timestamps are off: Especially in news and live broadcasts, the time a subtitle appears differs from when the speech actually occurs.
  • Some speech has no subtitles: Commercials and speech whose text is burned into the picture have no subtitles.
  • Subtitles are not verbatim: In casual speech, fillers such as "eh" are omitted from subtitles.

ReazonSpeech solves the timing offsets and the speech without subtitles by realigning audio and subtitles, and it leaves the non-verbatim subtitles as they are.

A major feature of ReazonSpeech is that it was built without relying on other large speech recognition models. The alignment model was grown by bootstrapping: first a small recognition model is trained on only 47.7 hours of Common Voice, then it is retrained on the utterances that model extracts, and so on.

Contents: construction, organization, and format

Construction is a loop: align subtitle text to audio, discard utterances that do not match, and retrain the alignment model on the remaining utterances.

  1. Train the initial recognition model. A generation-0 speech recognition model is trained on Japanese Common Voice v8.0 (47.7 hours).
  2. Align subtitle text to audio. A longer audio segment with a margin before the subtitle timestamp is taken, and the location of the subtitle text within it is found by CTC segmentation, which uses the recognition model's CTC output.
  3. Select only matching utterances. The extracted audio is transcribed by the recognition model, and only utterances whose character error rate (CER) against the subtitle is 0.33 or less are kept.
  4. Retrain the recognition model on the selected utterances. Steps 2–3 are repeated with the new model, and generations are added until enough data can be extracted.

The criterion in step 3 was chosen based on human listening checks. Compared with human judgments on 200 utterances, the "CER ≤ 0.33" criterion achieved an F1 of 0.87, closer to human judgment than a criterion based on CTC scores (F1 0.42).

The proportion of subtitle characters captured in the corpus (the extraction rate) rose with each generation. On recordings from December 27, 2022, the 7th generation surpassed an existing model trained on the TV program corpus LaboroTVSpeech, and the released model reached 70.12%.

Extraction rate=Transcript characters included in the corpusSubtitle characters\text{Extraction rate} = \frac{\text{Transcript characters included in the corpus}}{\text{Subtitle characters}}

The first release was built from One-Seg broadcast recordings from May 27, 2021 to December 25, 2022, aligned with the 10th-generation model (trained on 10,000 hours, extraction rate 66.84%). It contains 10,390,151 utterances, 15,735 hours, and 227.6 million characters of transcripts. For training efficiency, each utterance is limited to 14 seconds or less and the character set to 2,600 types. Without these limits, the full set is about 19,000 hours; this was the first released full split (all-v1).

Audio segmentation and transcripts involve the following measures.

  • Audio: To avoid cutting off the start of an utterance due to CTC segmentation errors, segments start at the midpoint from the end of the previous utterance, with at most 3 seconds added at the front.
  • Transcripts: Only full-width and half-width alphanumerics are unified and special characters removed; any further normalization is left to users.

The current splits come in five sizes.

SplitDurationSize
tiny8.5 h600 MB
small100 h6 GB
medium1,000 h65 GB
large5,000 h330 GB
all35,000 h2.3 TB

The format is one 16 kHz FLAC file per utterance with one transcript sentence. In accordance with copyright law, the data is distributed with the utterances shuffled so that programs cannot be reconstructed. As a result, there is no information about neighboring utterances or speakers.

Evaluation rules

ReazonSpeech has no official evaluation split or fixed evaluation procedure. The original paper evaluates models trained on ReazonSpeech on other Japanese corpora not used for training.

  • JSUT basic5000: 5,000 sentences containing common words, read by a single speaker in a quiet room.
  • Common Voice v8.0 test set: 4,483 utterances, with some background noise in the recording environment.

Because word boundaries are not explicit in Japanese, the metric is character error rate (CER) rather than a word-based one. It is the number of character substitutions SS, deletions DD, and insertions II needed to turn the recognition result into the reference, divided by the number of reference characters NN.

CER=S+D+IN\mathrm{CER} = \frac{S + D + I}{N}

The idea is the same as the English word error rate (WER), and lower is better. The original paper computes CER after removing punctuation and converting numbers into spoken words with num2words.

CER varies greatly with normalization, such as how punctuation is handled, how numbers are written ("3" vs. "三"), and full-width vs. half-width characters. ReazonSpeech's transcripts are TV subtitles, so their punctuation and number formatting are not necessarily the same as other corpora. When comparing papers, match the normalization and the corpora used for evaluation.

Usage and historical significance

ReazonSpeech is the corpus that made it possible to train Japanese speech recognition models from scratch on large amounts of data. Previous large Japanese corpora were mainly paid (CSJ) or required negotiation for commercial use (LaboroTVSpeech).

The original paper compares a speech recognition model trained on ReazonSpeech (15,000 hours) following the ESPnet recipe with other models.

ModelTraining dataJSUT basic5000Common Voice v8.0
Whisper small680,000 h (7,043 h of Japanese)14.3515.18
Whisper mediumSame as above9.8911.42
Whisper large-v2Same as above8.179.70
ESPnetLaboroTVSpeech11.7212.56
ESPnetReazonSpeech (15,000 h)8.239.93

Values are CER in %. A model trained on 15,000 hours of Japanese alone achieved a CER close to Whisper large-v2, which was trained on 680,000 hours of multilingual data. The original paper reports that CER on JSUT also fell as bootstrapping generations progressed.

The corpus later expanded to 35,000 hours in v2.0, and the same team has released speech recognition models trained on this data under the Apache License 2.0. The v2.0 models include ESPnet models as well as NeMo models based on Fast Conformer (a faster variant of Conformer).

The method of building corpora automatically from subtitles is significant in itself. Because a large corpus could be built starting from a small public dataset, the original paper states that the same method may make it possible to build large corpora even for languages with little transcribed data.

Caveats

License: The corpus is distributed under CDLA-Sharing-1.0. Users must agree to the terms on Hugging Face, and the distribution page requires that it be used only for the purposes defined in Article 30-4 of the Japanese Copyright Act (such as information analysis). The speech recognition models and the corpus-building tools are under the Apache License 2.0.

The abstract of the original paper says the corpus is "free to use, including commercially," but the current distribution page limits use to the purposes of Article 30-4 of the Copyright Act. It cannot be used for purposes other than information analysis, such as playing or distributing the audio itself. Check the latest terms on the distribution page before use. Also, if a program's rights holder requests it, the corresponding utterances will be removed.

Transcripts are not verbatim: Because they are based on subtitles, fillers such as "eh" and self-corrections may be omitted. The criterion of CER ≤ 0.33 tolerates up to about one mismatch in every three characters, so transcription errors are also included. The corpus is not suited for research that requires verbatim transcripts (such as filler detection).

No speaker information: Utterances are shuffled and there are no speaker IDs, so the corpus cannot be used for speaker-separated evaluation or speaker identification research.

Biased toward broadcast audio: Because it is TV program audio, its characteristics differ from speech in other settings, such as phone calls, meetings, or soliloquy. The amount of speech captured also varies by program genre.

Size: The full set (all) is 2.3 TB. Start with small (100 hours) or medium (1,000 hours) and scale up as needed.

Comparison with similar datasets

Representative Japanese and English speech recognition corpora compare as follows from the same perspective.

DatasetLanguageHow it was builtDurationMain useAudio formatLicense
ReazonSpeechJapaneseAutomatically matches TV subtitles and audioAbout 35,000 h (v2.0)Training speech recognition16 kHz, FLACCDLA-Sharing-1.0 (limited to Article 30-4 purposes of the Copyright Act)
Common VoiceMultilingualVolunteers read sentences, others verifyJapanese: 48 h in v8.0 (table in the original paper)Speech recognition48 kHz, MP3CC0
JSUTJapaneseA single speaker reads in a studioAbout 10 hSpeech synthesis (also used to evaluate speech recognition)48 kHz, WAVText under CC BY-SA 4.0 etc.; audio for research, non-commercial, and personal use (commercial use by arrangement)
LibriSpeechEnglishMatches audiobook readings with book textsAbout 1,000 hSpeech recognition16 kHz, FLACCC BY 4.0

The original paper also lists other Japanese corpora: CSJ (600 hours, paid, human-transcribed), JTubeSpeech (1,300 hours, free, built automatically from YouTube subtitles), and LaboroTVSpeech (2,050 hours, commercial use by negotiation, built automatically from TV).

Rough guidelines for choosing:

  • To train Japanese speech recognition models on large amounts of data, use ReazonSpeech.
  • To evaluate Japanese speech recognition under the same conditions as other papers, measure CER on JSUT basic5000 or the Common Voice test set.
  • If you need verbatim transcripts or features of spontaneous speech, consider human-transcribed corpora (such as CSJ).
  • For English speech recognition, use LibriSpeech.

PyTorch example

Show code
python
import re
import unicodedata

import torch
import torchaudio
from datasets import load_dataset
from torch.utils.data import DataLoader, Dataset

"""
Load a small split of ReazonSpeech (reazon-research/reazonspeech on Hugging Face)
and turn it into pairs of log-mel spectrograms and transcripts. Also includes a function to evaluate by character error rate (CER)
Note: before use, agree to the terms on Hugging Face (limited to Article 30-4 purposes of the Japanese Copyright Act) and log in
"""


class ReazonSpeech(Dataset):
  def __init__(self, size='small'):  # tiny, small, medium, large, all
    self.data = load_dataset('reazon-research/reazonspeech', size, split='train', trust_remote_code=True)
    # 16 kHz audio to an 80-bin mel spectrogram with a 25 ms window and 10 ms hop
    self.mel = torchaudio.transforms.MelSpectrogram(sample_rate=16000, n_fft=400, hop_length=160, n_mels=80)

  def __len__(self):
    return len(self.data)

  def __getitem__(self, i):
    ex = self.data[i]
    wav = torch.tensor(ex['audio']['array'], dtype=torch.float32)  # all audio is 16 kHz
    feats = torch.log(self.mel(wav) + 1e-6).t()  # [frames, 80]
    return feats, ex['transcription']


def collate(batch):
  feats, texts = zip(*batch)
  lengths = torch.tensor([f.size(0) for f in feats])
  return torch.nn.utils.rnn.pad_sequence(feats, batch_first=True), lengths, list(texts)


def normalize(text):
  # unify full-/half-width forms and remove punctuation and symbols before comparing characters
  text = unicodedata.normalize('NFKC', text)
  return re.sub(r'[\s、。,.!?!?「」『』()()・…ー―\-]', '', text)


def char_errors(ref, hyp):
  # edit distance between reference and hypothesis (substitutions + deletions + insertions)
  d = list(range(len(hyp) + 1))
  for i in range(1, len(ref) + 1):
    prev, d[0] = d[0], i
    for j in range(1, len(hyp) + 1):
      cur = min(d[j] + 1, d[j - 1] + 1, prev + (ref[i - 1] != hyp[j - 1]))
      prev, d[j] = d[j], cur
  return d[len(hyp)], len(ref)


def evaluate(model, decode, dataset):
  # CER = total errors over all utterances / total reference characters over all utterances
  loader = DataLoader(dataset, batch_size=16, collate_fn=collate)
  model.eval()  # disable Dropout etc.
  errors, chars = 0, 0
  with torch.no_grad():
    for feats, lengths, texts in loader:
      hyps = decode(model(feats, lengths), lengths)  # decode is a function that returns a list of strings
      for ref, hyp in zip(texts, hyps):
        e, n = char_errors(normalize(ref), normalize(hyp))
        errors += e
        chars += n
  return 100.0 * errors / chars


# train = ReazonSpeech('small')  # about 100 hours
# evaluate on other corpora not used for training (e.g., JSUT basic5000, the Common Voice test set)

FAQ

Q. Can I use a speech recognition model trained on ReazonSpeech in a commercial service?
A.

The distribution page states that use of the corpus is limited to the purposes of Article 30-4 of the Copyright Act. Training a model is considered to fall under information analysis, but whether a specific use meets the terms should be checked against the latest terms on the distribution page and, if necessary, with a legal expert. Note that the pretrained speech recognition models released by the same team are under the Apache License 2.0.

Q. Does ReazonSpeech have an evaluation split?
A.

There is no official train/test split. The original paper measures CER on other corpora not used for training (JSUT basic5000 and the Common Voice v8.0 test set). If you use part of ReazonSpeech for evaluation, note that utterances are shuffled, so utterances from the same program may end up in both training and evaluation, and publish the list of utterances you used.

Q. Do the transcripts include punctuation?
A.

Because they are based on subtitles, punctuation is preserved (the example on the distribution page is 「今日のニュースをお伝えします。」, "Here is today's news."). The original paper only unifies full-width and half-width alphanumerics and removes special characters, leaving further normalization to users. In evaluation, CER is computed after removing punctuation.

References

  1. Yin, Y., Mori, D., & Fujimoto, S. (2023). ReazonSpeech: A Free and Massive Corpus for Japanese ASR. The 29th Annual Meeting of the Association for Natural Language Processing (NLP2023).
  2. ReazonSpeech (official project page).
  3. reazon-research/reazonspeech (Hugging Face dataset card).
  4. Release of ReazonSpeech v2.0 (Reazon Human Interaction Lab blog, 2024-02-14).
  5. reazon-research/ReazonSpeech (repository of corpus-building tools and speech recognition models).