mmlearn.datasets.librispeech.LibriSpeech

class LibriSpeech(root_dir, split='train-clean-100')[source]

Bases: Dataset[Example]

LibriSpeech dataset.

This is a wrapper around torchaudio.datasets.LIBRISPEECH that assumes that the dataset is already downloaded and the top-level directory of the dataset in the root directory is librispeech.

Parameters:
  • root_dir (str) – Root directory of dataset.

  • split ({"train-clean-100", "train-clean-360", "train-other-500", "dev-clean", "dev-other", "test-clean", "test-other"}, default="train-clean-100") – Split of the dataset to use.

Raises:

ImportError – If torchaudio is not installed.

Notes

This dataset only returns the audio and transcript from the dataset.

Methods

__getitem__(idx)[source]

Return an example from the dataset.

Return type:

Example