- class torchaudio.datasets.LibriMix(root: Union[str, Path], subset: str = 'train-360', num_speakers: int = 2, sample_rate: int = 8000, task: str = 'sep_clean', mode: str = 'min')¶
LibriMix [Cosentino et al., 2020] dataset.
root (str or Path) – The path where the directory
Libri3Mixis stored. Not the path of those directories.
subset (str, optional) – The subset to use. Options: [
num_speakers (int, optional) – The number of speakers, which determines the directories to traverse. The Dataset will traverse
sNdirectories to collect N source audios. (Default: 2)
sample_rate (int, optional) – Sample rate of audio files. The
sample_ratedetermines which subdirectory the audio are fetched. If any of the audio has a different sample rate, raises
ValueError. Options: [8000, 16000] (Default: 8000)
task (str, optional) – The task of LibriMix. Options: [
mode (str, optional) – The mode when creating the mixture. If set to
"min", the lengths of mixture and sources are the minimum length of all sources. If set to
"max", the lengths of mixture and sources are zero padded to the maximum length of all sources. Options: [
The LibriMix dataset needs to be manually generated. Please check https://github.com/JorisCos/LibriMix