Shortcuts

asteroid.data.librimix_dataset module

class asteroid.data.librimix_dataset.LibriMix(csv_dir, task='sep_clean', sample_rate=16000, n_src=2, segment=3, return_id=False)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Dataset class for LibriMix source separation tasks.

Parameters:
  • csv_dir (str) – The path to the metadata file.
  • task (str) –

    One of 'enh_single', 'enh_both', 'sep_clean' or 'sep_noisy' :

    • 'enh_single' for single speaker speech enhancement.
    • 'enh_both' for multi speaker speech enhancement.
    • 'sep_clean' for two-speaker clean source separation.
    • 'sep_noisy' for two-speaker noisy source separation.
  • sample_rate (int) – The sample rate of the sources and mixtures.
  • n_src (int) – The number of sources in the mixture.
  • segment (int, optional) – The desired sources and mixtures length in s.
References
[1] “LibriMix: An Open-Source Dataset for Generalizable Speech Separation”, Cosentino et al. 2020.
dataset_name = 'LibriMix'[source]
classmethod loaders_from_mini(batch_size=4, **kwargs)[source]

Downloads MiniLibriMix and returns train and validation DataLoader.

Parameters:
  • batch_size (int) – Batch size of the Dataloader. Only DataLoader param. To have more control on Dataloader, call mini_from_download and instantiate the DatalLoader.
  • **kwargs – keyword arguments to pass the LibriMix, see __init__. The kwargs will be fed to both the training set and validation set.
Returns:

train_loader, val_loader – training and validation DataLoader out of LibriMix Dataset.

Examples
>>> from asteroid.data import LibriMix
>>> train_loader, val_loader = LibriMix.loaders_from_mini(
>>>     task='sep_clean', batch_size=4
>>> )
classmethod mini_from_download(**kwargs)[source]

Downloads MiniLibriMix and returns train and validation Dataset. If you want to instantiate the Dataset by yourself, call mini_download that returns the path to the path to the metadata files.

Parameters:**kwargs – keyword arguments to pass the LibriMix, see __init__. The kwargs will be fed to both the training set and validation set
Returns:train_set, val_set – training and validation instances of LibriMix (data.Dataset).
Examples
>>> from asteroid.data import LibriMix
>>> train_set, val_set = LibriMix.mini_from_download(task='sep_clean')
static mini_download()[source]

Downloads MiniLibriMix from Zenodo in current directory

Returns:The path to the metadata directory.
get_infos()[source]

Get dataset infos (for publishing models).

Returns:dict, dataset infos with keys dataset, task and licences.
Read the Docs v: v0.4.4
Versions
latest
stable
v0.4.4
v0.4.3
v0.4.2
v0.4.1
v0.4.0
v0.3.5_b
v0.3.4
v0.3.3
v0.3.2
v0.3.1
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.