facebook/multilingual_librispeech

Dataset

189

stars

26

commits

2

linked in READMEs

Aug 12, 2024

updated

Browse cluster: Multilingual Speech Recognition Datasets

README

Dataset Card for MultiLingual LibriSpeech

Table of Contents

Dataset Description

Dataset Summary

This is a streamable version of the Multilingual LibriSpeech (MLS) dataset. The data archives were restructured from the original ones from OpenSLR to make it easier to stream.

MLS dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish. It includes about 44.5K hours of English and a total of about 6K hours for other languages.

Supported Tasks and Leaderboards

  • automatic-speech-recognition, speaker-identification: The dataset can be used to train a model for Automatic Speech Recognition (ASR). The model is presented with an audio file and asked to transcribe the audio file to written text. The most common evaluation metric is the word error rate (WER). The task has an active leaderboard which can be found at https://paperswithcode.com/dataset/multilingual-librispeech and ranks models based on their WER.
  • text-to-speech, text-to-audio: The dataset can also be used to train a model for Text-To-Speech (TTS).

Languages

The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish

How to use

The datasets library allows you to load and pre-process your dataset in pure Python, at scale. The dataset can be downloaded and prepared in one call to your local drive by using the load_dataset function.

For example, to download the German config, simply specify the corresponding language config name (i.e., "german" for German):

from datasets import load_dataset
mls = load_dataset("facebook/multilingual_librispeech", "german", split="train")

Using the datasets library, you can also stream the dataset on-the-fly by adding a streaming=True argument to the load_dataset function call. Loading a dataset in streaming mode loads individual samples of the dataset at a time, rather than downloading the entire dataset to disk.

from datasets import load_dataset
mls = load_dataset("facebook/multilingual_librispeech", "german", split="train", streaming=True)
print(next(iter(mls)))

Bonus: create a PyTorch dataloader directly with your own datasets (local/streamed).

Local:

from datasets import load_dataset
from torch.utils.data.sampler import BatchSampler, RandomSampler
mls = load_dataset("facebook/multilingual_librispeech", "german", split="train")
batch_sampler = BatchSampler(RandomSampler(mls), batch_size=32, drop_last=False)
dataloader = DataLoader(mls, batch_sampler=batch_sampler)

Streaming:

from datasets import load_dataset
from torch.utils.data import DataLoader
mls = load_dataset("facebook/multilingual_librispeech", "german", split="train", streaming=True)
dataloader = DataLoader(mls, batch_size=32)

To find out more about loading and preparing audio datasets, head over to hf.co/blog/audio-datasets.

Example scripts

Train your own CTC or Seq2Seq Automatic Speech Recognition models on MultiLingual Librispeech with transformers - here.

Dataset Structure

Data Instances

A typical data point comprises the path to the audio file, usually called file and its transcription, called text. Some additional information about the speaker and the passage which contains the transcription is provided.

{'file': '10900_6473_000030.flac',
 'audio': {'path': '10900_6473_000030.flac',
  'array': array([-1.52587891e-04,  6.10351562e-05,  0.00000000e+00, ...,
          4.27246094e-04,  5.49316406e-04,  4.57763672e-04]),
  'sampling_rate': 16000},
 'text': 'więc czego chcecie odemnie spytałem wysłuchawszy tego zadziwiającego opowiadania broń nas stary człowieku broń zakrzyknęli równocześnie obaj posłowie\n',
 'speaker_id': 10900,
 'chapter_id': 6473,
 'id': '10900_6473_000030'}

Data Fields

  • file: A filename .flac format.

  • audio: A dictionary containing the audio filename, the decoded audio array, and the sampling rate. Note that when accessing the audio column: dataset[0]["audio"] the audio file is automatically decoded and resampled to dataset.features["audio"].sampling_rate. Decoding and resampling of a large number of audio files might take a significant amount of time. Thus it is important to first query the sample index before the "audio" column, i.e. dataset[0]["audio"] should always be preferred over dataset["audio"][0].

  • text: the transcription of the audio file.

  • id: unique id of the data sample.

  • speaker_id: unique id of the speaker. The same speaker id can be found for multiple data samples.

  • chapter_id: id of the audiobook chapter which includes the transcription.

Data Splits

Number of samplesTrainTrain.9hTrain.1hDevTest
german469942219424134693394
dutch374287215323430953075
french258213216724124162426
spanish220701211023324082385
italian59623217324012481262
portuguese375332116236826871
polish250432173238512520

Dataset Creation

Curation Rationale

[Needs More Information]

Source Data

Initial Data Collection and Normalization

[Needs More Information]

Who are the source language producers?

[Needs More Information]

Annotations

Annotation process

[Needs More Information]

Who are the annotators?

[Needs More Information]

Personal and Sensitive Information

The dataset consists of people who have donated their voice online. You agree to not attempt to determine the identity of speakers in this dataset.

Considerations for Using the Data

Social Impact of Dataset

[More Information Needed]

Discussion of Biases

[More Information Needed]

Other Known Limitations

[Needs More Information]

Additional Information

Dataset Curators

[Needs More Information]

Licensing Information

Public Domain, Creative Commons Attribution 4.0 International Public License (CC-BY-4.0)

Citation Information

@article{Pratap2020MLSAL,
  title={MLS: A Large-Scale Multilingual Dataset for Speech Research},
  author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},
  journal={ArXiv},
  year={2020},
  volume={abs/2012.03411}
}

Data Statistics

Duration (h)TrainDevTest
English44,659.7415.7515.55
German1,966.5114.2814.29
Dutch1,554.2412.7612.76
French1,076.5810.0710.07
Spanish917.689.9910
Italian247.385.185.27
Portuguese160.963.643.74
Polish103.652.082.14
# SpeakersTrainDevTest
GenderMFMFMF
English2742274821212121
German819515151515
Dutch9313333
French62809999
Spanish365010101010
Italian22435555
Portuguese26165555
Polish652222
# Hours / GenderDevTest
GenderMFMF
English7.767.997.627.93
German7.067.2277.29
Dutch6.446.326.726.04
French5.134.945.045.02
Spanish4.915.084.785.23
Italian2.52.682.382.9
Portuguese1.841.811.831.9
Polish1.120.951.091.05

Contributions

Thanks to @patrickvonplaten and @polinaeterna for adding this dataset.

Contributors

anton-l

11 commits

lhoestq

5 commits

polinaeterna

4 commits

reach-vb

1 commits

facebook/multilingual_librispeech

Dataset

189

stars

26

commits

2

linked in READMEs

Aug 12, 2024

updated

Browse cluster: Multilingual Speech Recognition Datasets

README

Dataset Card for MultiLingual LibriSpeech

Table of Contents

Dataset Description

Dataset Summary

This is a streamable version of the Multilingual LibriSpeech (MLS) dataset. The data archives were restructured from the original ones from OpenSLR to make it easier to stream.

MLS dataset is a large multilingual corpus suitable for speech research. The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish. It includes about 44.5K hours of English and a total of about 6K hours for other languages.

Supported Tasks and Leaderboards

  • automatic-speech-recognition, speaker-identification: The dataset can be used to train a model for Automatic Speech Recognition (ASR). The model is presented with an audio file and asked to transcribe the audio file to written text. The most common evaluation metric is the word error rate (WER). The task has an active leaderboard which can be found at https://paperswithcode.com/dataset/multilingual-librispeech and ranks models based on their WER.
  • text-to-speech, text-to-audio: The dataset can also be used to train a model for Text-To-Speech (TTS).

Languages

The dataset is derived from read audiobooks from LibriVox and consists of 8 languages - English, German, Dutch, Spanish, French, Italian, Portuguese, Polish

How to use

The datasets library allows you to load and pre-process your dataset in pure Python, at scale. The dataset can be downloaded and prepared in one call to your local drive by using the load_dataset function.

For example, to download the German config, simply specify the corresponding language config name (i.e., "german" for German):

from datasets import load_dataset
mls = load_dataset("facebook/multilingual_librispeech", "german", split="train")

Using the datasets library, you can also stream the dataset on-the-fly by adding a streaming=True argument to the load_dataset function call. Loading a dataset in streaming mode loads individual samples of the dataset at a time, rather than downloading the entire dataset to disk.

from datasets import load_dataset
mls = load_dataset("facebook/multilingual_librispeech", "german", split="train", streaming=True)
print(next(iter(mls)))

Bonus: create a PyTorch dataloader directly with your own datasets (local/streamed).

Local:

from datasets import load_dataset
from torch.utils.data.sampler import BatchSampler, RandomSampler
mls = load_dataset("facebook/multilingual_librispeech", "german", split="train")
batch_sampler = BatchSampler(RandomSampler(mls), batch_size=32, drop_last=False)
dataloader = DataLoader(mls, batch_sampler=batch_sampler)

Streaming:

from datasets import load_dataset
from torch.utils.data import DataLoader
mls = load_dataset("facebook/multilingual_librispeech", "german", split="train", streaming=True)
dataloader = DataLoader(mls, batch_size=32)

To find out more about loading and preparing audio datasets, head over to hf.co/blog/audio-datasets.

Example scripts

Train your own CTC or Seq2Seq Automatic Speech Recognition models on MultiLingual Librispeech with transformers - here.

Dataset Structure

Data Instances

A typical data point comprises the path to the audio file, usually called file and its transcription, called text. Some additional information about the speaker and the passage which contains the transcription is provided.

{'file': '10900_6473_000030.flac',
 'audio': {'path': '10900_6473_000030.flac',
  'array': array([-1.52587891e-04,  6.10351562e-05,  0.00000000e+00, ...,
          4.27246094e-04,  5.49316406e-04,  4.57763672e-04]),
  'sampling_rate': 16000},
 'text': 'więc czego chcecie odemnie spytałem wysłuchawszy tego zadziwiającego opowiadania broń nas stary człowieku broń zakrzyknęli równocześnie obaj posłowie\n',
 'speaker_id': 10900,
 'chapter_id': 6473,
 'id': '10900_6473_000030'}

Data Fields

  • file: A filename .flac format.

  • audio: A dictionary containing the audio filename, the decoded audio array, and the sampling rate. Note that when accessing the audio column: dataset[0]["audio"] the audio file is automatically decoded and resampled to dataset.features["audio"].sampling_rate. Decoding and resampling of a large number of audio files might take a significant amount of time. Thus it is important to first query the sample index before the "audio" column, i.e. dataset[0]["audio"] should always be preferred over dataset["audio"][0].

  • text: the transcription of the audio file.

  • id: unique id of the data sample.

  • speaker_id: unique id of the speaker. The same speaker id can be found for multiple data samples.

  • chapter_id: id of the audiobook chapter which includes the transcription.

Data Splits

Number of samplesTrainTrain.9hTrain.1hDevTest
german469942219424134693394
dutch374287215323430953075
french258213216724124162426
spanish220701211023324082385
italian59623217324012481262
portuguese375332116236826871
polish250432173238512520

Dataset Creation

Curation Rationale

[Needs More Information]

Source Data

Initial Data Collection and Normalization

[Needs More Information]

Who are the source language producers?

[Needs More Information]

Annotations

Annotation process

[Needs More Information]

Who are the annotators?

[Needs More Information]

Personal and Sensitive Information

The dataset consists of people who have donated their voice online. You agree to not attempt to determine the identity of speakers in this dataset.

Considerations for Using the Data

Social Impact of Dataset

[More Information Needed]

Discussion of Biases

[More Information Needed]

Other Known Limitations

[Needs More Information]

Additional Information

Dataset Curators

[Needs More Information]

Licensing Information

Public Domain, Creative Commons Attribution 4.0 International Public License (CC-BY-4.0)

Citation Information

@article{Pratap2020MLSAL,
  title={MLS: A Large-Scale Multilingual Dataset for Speech Research},
  author={Vineel Pratap and Qiantong Xu and Anuroop Sriram and Gabriel Synnaeve and Ronan Collobert},
  journal={ArXiv},
  year={2020},
  volume={abs/2012.03411}
}

Data Statistics

Duration (h)TrainDevTest
English44,659.7415.7515.55
German1,966.5114.2814.29
Dutch1,554.2412.7612.76
French1,076.5810.0710.07
Spanish917.689.9910
Italian247.385.185.27
Portuguese160.963.643.74
Polish103.652.082.14
# SpeakersTrainDevTest
GenderMFMFMF
English2742274821212121
German819515151515
Dutch9313333
French62809999
Spanish365010101010
Italian22435555
Portuguese26165555
Polish652222
# Hours / GenderDevTest
GenderMFMF
English7.767.997.627.93
German7.067.2277.29
Dutch6.446.326.726.04
French5.134.945.045.02
Spanish4.915.084.785.23
Italian2.52.682.382.9
Portuguese1.841.811.831.9
Polish1.120.951.091.05

Contributions

Thanks to @patrickvonplaten and @polinaeterna for adding this dataset.

Contributors

anton-l

11 commits

lhoestq

5 commits

polinaeterna

4 commits

reach-vb

1 commits