AI Logic

Datasets and Benchmarks

LJ Speech

Updated:

How LJ Speech was built and organized. Left: the flow of taking LibriVox recordings of seven non-fiction books read by one speaker, cutting them at silences, and manually matching them to the text to produce LJ Speech 1.1, plus example splits used by papers in the absence of an official split (FastSpeech and VITS). Right: the file layout, the format of one metadata.csv line, and the audio format, clip length, and evaluation conventions

Overview

LJ Speech is a speech synthesis dataset of 13,100 clips (about 24 hours) of a single woman reading English books, with transcripts. Keith Ito released it in 2017. There is no paper; the official page is the only description. The text, audio, and transcripts are all in the public domain, with no restrictions on use.

The audio comes from LibriVox, where volunteers read public-domain books, and the speaker is Linda Johnson. Ito cut these recordings into short clips and matched them to the text, putting them in a form suitable for training speech synthesis models.

Because it offers about 24 hours of a single voice that anyone can use freely, it became the common dataset widely used in English speech synthesis research. Many papers on speech synthesis and vocoders (models that generate waveforms from mel spectrograms and similar features), such as FastSpeech, HiFi-GAN, and VITS, train on LJ Speech and compare performance on it.

A single voice is collected because, in speech synthesis, keeping "whose voice" fixed makes it easier to learn the correspondence between text and sound. The required property is the opposite of speech recognition datasets, which gather many speakers.

Contents: construction, structure, and format

Construction, according to the official page, is as follows.

  1. Choose the readings. It uses LibriVox recordings, made by Linda Johnson in 2016–17, of seven non-fiction books published between 1884 and 1964. The books include the report of the investigation into President Kennedy's assassination, records of Newgate Prison, President Roosevelt's fireside chats, an introductory cookbook, and a book on the Seven Wonders of the Ancient World.
  2. Cut automatically at silences. The recordings are cut into 1–10 second clips at silent points. Clip boundaries often, but not always, coincide with sentence or clause boundaries.
  3. Match the text by hand. Each clip is manually matched to the text, and a QA pass checks that the audio and transcript agree.

Structure, from the statistics on the official page:

ItemValue
Clips13,100
Total duration23:55:17
Clip length1.11–10.10 s (mean 6.57 s)
Words225,715 (13,821 distinct)
Words per clipMean 17.23
Speakers1

Format: one WAV file per clip (22,050 Hz, 16-bit, mono) is placed in the wavs/ folder, and metadata.csv lists one transcript per clip per line. metadata.csv is "|"-delimited with the following three columns.

ColumnContents
IDWAV file name (e.g., LJ001-0001)
TranscriptionThe text exactly as read
Normalized transcriptionNumbers, ordinals, and monetary amounts expanded into words (e.g., "$3" to "three dollars")

Speech synthesis models generate sound from sequences of characters or phonemes, so it must be decided in advance whether "1884" is read as "eighteen eighty-four" or "one thousand eight hundred eighty-four". The third column fixes these readings in advance.

There is no official split. Each paper splits randomly; for example, FastSpeech uses 12,500 training, 300 validation, and 300 test clips, while VITS uses 12,500 training, 100 validation, and 500 test clips.

Evaluation rules

LJ Speech has no fixed evaluation protocol, and most papers compare models by MOS (mean opinion score), in which listeners rate naturalness on a 1–5 scale. The same listeners rate speech synthesized from the text of test clips and the original recordings of the same text (ground truth), to see how close the synthesis is to the original.

MOS=1Mβˆ‘m=1Msm\mathrm{MOS} = \frac{1}{M} \sum_{m=1}^{M} s_m

Here sms_m is the score of each rating and MM is the number of ratings. It is common to report a 95% confidence interval along with the mean.

MOS varies with the listeners and the rating conditions. Even for the same original recordings, the HiFi-GAN paper reports 4.45 and the VITS paper 4.46. Do not compare MOS values directly across papers; compare differences within the same paper or the gap from the original recordings.

Because listening tests are laborious, MOS prediction models (such as MOSNet and UTMOS) or the word error rate (WER) of synthesized speech run through a speech recognizer are sometimes used as supplementary measures of pronunciation accuracy.

Usage and historical significance

LJ Speech became the common ground for English speech synthesis, where anyone can train on the same data and compare under the same conditions. The official page also introduces an implementation example that trains Tacotron on this data.

Its two main uses are:

The HiFi-GAN paper gives as its reason for comparing vocoders on LJ Speech that "many speech synthesis models are trained on this data, enabling fair and reproducible comparison". MOS values within the same papers are as follows.

PaperModelMOS
HiFi-GAN (Kong et al. 2020)Ground truth4.45
HiFi-GAN (Kong et al. 2020)WaveNet (MoL)4.02
HiFi-GAN (Kong et al. 2020)WaveGlow3.81
HiFi-GAN (Kong et al. 2020)MelGAN3.79
HiFi-GAN (Kong et al. 2020)HiFi-GAN V14.36
VITS (Kim et al. 2021)Ground truth4.46
VITS (Kim et al. 2021)Tacotron 2 + HiFi-GAN3.77
VITS (Kim et al. 2021)Glow-TTS + HiFi-GAN4.14
VITS (Kim et al. 2021)VITS4.43

The HiFi-GAN rows evaluate waveforms reconstructed from mel spectrograms of the original recordings, while the VITS rows evaluate speech generated from text. Since they evaluate different things, values are not compared across the two papers.

Caveats

License: the text, audio, and transcripts are all in the public domain and can be used without attribution. The official page recommends linking to the page or citing the given reference when used in papers.

The data itself has no restrictions, but a model trained on LJ Speech produces speech resembling the voice of a real person (Linda Johnson). The official page also asks that it be "used for good"; avoid uses that impersonate her.

Audio quality: the original LibriVox recordings were distributed as 128 kbps MP3, so compression artifacts may remain. The WaveGlow paper states that the recordings were made at home with the built-in microphone of a MacBook Pro. Compared with studio-recorded commercial speech synthesis data, audio quality is limited.

Old text from a narrow domain: the text is non-fiction, such as reports and records, from 1884–1964. It contains almost no conversational tone, new words, questions, or emotional readings.

Normalization is incomplete: the third column expands only numbers, ordinals, and monetary amounts; abbreviations such as "Mr." and "Dr." remain. The official page lists an expansion table (Mr. β†’ Mister, etc.) and notes that "Mrs." has no fixed reading. Nineteen transcripts contain non-English characters (e.g., "raison d'Γͺtre").

Splits differ between papers: since there is no official split, the test clips differ by paper. In your own experiments, publishing the split you used (the list of file IDs) lets others compare under the same conditions.

Versions 1.0 and 1.1: version 1.0 contained 30 WAV files without transcripts, which were removed in version 1.1. Use version 1.1.

Comparison with similar datasets

Representative English and Japanese speech datasets compared along the same dimensions:

DatasetLanguageSpeakersDurationMain useAudio formatLicense
LibriSpeechEnglish2,484~1,000 hoursSpeech recognition16 kHz, FLACCC BY 4.0
Common VoiceMultilingual (295 languages in v27.0)1 to ~100,000 per language (English)42,593 hours across all languages (29,295 validated)Speech recognition48 kHz, MP3CC0
LJ SpeechEnglish1~24 hoursSpeech synthesis22.05 kHz, WAVPublic domain
JSUTJapanese1~10 hoursSpeech synthesis48 kHz, WAVText under CC BY-SA 4.0 etc.; audio for research, non-commercial, and personal use (commercial use upon consultation)

Rough guidelines for choosing:

  • To compare single-voice English speech synthesis or vocoders with other papers, use LJ Speech.
  • For English speech synthesis that switches between multiple speakers, you need a dataset with many speakers' voices. The VITS paper uses VCTK (109 speakers, about 44 hours). LibriTTS is another candidate.
  • For Japanese speech synthesis, use JSUT, which likewise has a single speaker.
  • For English speech recognition, use multi-speaker data such as LibriSpeech or Common Voice. LJ Speech has only one speaker, so it is not suited for training speech recognition.

PyTorch example

Show code
python
import csv
import os
import random

import soundfile as sf
import torch
import torchaudio
from torch.utils.data import Dataset

"""
Load LJ Speech 1.1 (LJSpeech-1.1/wavs/*.wav and metadata.csv) as pairs of
"character ID sequence" and "log-mel spectrogram" for speech synthesis training
"""

ROOT = 'LJSpeech-1.1'


def read_metadata(root):
  # "|"-delimited: ID, transcription, normalized transcription. Sentences contain quotes, so do not treat quotes specially
  with open(os.path.join(root, 'metadata.csv'), encoding='utf-8', newline='') as f:
    return [row for row in csv.reader(f, delimiter='|', quoting=csv.QUOTE_NONE)]


rows = read_metadata(ROOT)
print(len(rows))  # 13100

# There is no official split, so split with a fixed random seed and save the ID lists (e.g. 12,500 / 300 / 300 as in FastSpeech)
random.Random(1234).shuffle(rows)
splits = {'train': rows[:12500], 'valid': rows[12500:12800], 'test': rows[12800:]}

# The normalized transcription already expands numbers and amounts, but abbreviations like Mr. remain, so expand them yourself
ABBREVIATIONS = {'mr.': 'mister', 'mrs.': 'misess', 'dr.': 'doctor', 'st.': 'saint', 'no.': 'number', 'co.': 'company'}
SYMBOLS = "_ abcdefghijklmnopqrstuvwxyz'.,?!-;:\""
CHAR_TO_ID = {c: i for i, c in enumerate(SYMBOLS)}


def text_to_ids(text):
  words = [ABBREVIATIONS.get(w, w) for w in text.lower().split()]
  return torch.tensor([CHAR_TO_ID[c] for c in ' '.join(words) if c in CHAR_TO_ID], dtype=torch.long)


class LJSpeech(Dataset):
  def __init__(self, root, rows):
    self.root, self.rows = root, rows
    # 80-dim mel spectrogram of 22,050 Hz audio with a 1024-point window and 256-point hop (a common setting)
    self.mel = torchaudio.transforms.MelSpectrogram(sample_rate=22050, n_fft=1024, win_length=1024,
                                                    hop_length=256, f_min=0.0, f_max=8000.0, n_mels=80)

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

  def __getitem__(self, i):
    utt_id, _, normalized = self.rows[i]
    wav, sr = sf.read(os.path.join(self.root, 'wavs', utt_id + '.wav'), dtype='float32')
    assert sr == 22050  # all 22,050 Hz, mono
    mel = torch.log(torch.clamp(self.mel(torch.from_numpy(wav)), min=1e-5))  # [80, frames]
    return text_to_ids(normalized), mel


train_set = LJSpeech(ROOT, splits['train'])
# Have listeners rate speech synthesized from test texts alongside the original recordings of the same texts, and compare by MOS

FAQ

Q. Does LJ Speech have an official training/test split?
A.

No. Each paper splits randomly; for example, FastSpeech uses 12,500/300/300 and VITS uses 12,500/100/500. When comparing with other papers, use the split that paper published (the list of file IDs) or publish your own.

Q. Which should I use for training, the second or third column of the transcripts?
A.

Speech synthesis usually uses the third column, the normalized transcription, because numbers and amounts are expanded into words and their readings are fixed. However, abbreviations such as "Mr." are not expanded, so expand them yourself following the table on the official page.

Q. Can a model trained on LJ Speech be used in a commercial product?
A.

The data license imposes no restrictions (public domain). However, the generated voice resembles that of a real speaker. Take care in how it is used, for example by avoiding impersonation or misleading uses and telling users that the speech is synthetic.

References

  1. Ito, K., & Johnson, L. (2017). The LJ Speech Dataset (official page, version 1.1).
  2. Ren, Y., et al. (2019). FastSpeech: Fast, Robust and Controllable Text to Speech. NeurIPS 2019.
  3. Prenger, R., Valle, R., & Catanzaro, B. (2018). WaveGlow: A Flow-based Generative Network for Speech Synthesis. ICASSP 2019.
  4. Kong, J., Kim, J., & Bae, J. (2020). HiFi-GAN: Generative Adversarial Networks for Efficient and High Fidelity Speech Synthesis. NeurIPS 2020.
  5. Kim, J., Kong, J., & Son, J. (2021). Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech (VITS). ICML 2021.
  6. PyTorch. torchaudio.datasets.LJSPEECH (API reference).