Shortcuts

MUSDB_HQ

class torchaudio.datasets.MUSDB_HQ(root: Union[str, Path], subset: str, sources: Optional[List[str]] = None, split: Optional[str] = None, download: bool = False)[source]

MUSDB_HQ [Rafii et al., 2019] dataset.

Parameters:
  • root (str or Path) – Root directory where the dataset’s top level directory is found

  • subset (str) – Subset of the dataset to use. Options: ["train", "test"].

  • sources (List[str] or None, optional) – Sources extract data from. List can contain the following options: ["bass", "drums", "other", "mixture", "vocals"]. If None, dataset consists of tracks except mixture. (default: None)

  • split (str or None, optional) – Whether to split training set into train and validation set. If None, no splitting occurs. If train or validation, returns respective set. (default: None)

  • download (bool, optional) – Whether to download the dataset if it is not found at root path. (default: False)

__getitem__

MUSDB_HQ.__getitem__(n: int) Tuple[Tensor, int, int, str][source]

Load the n-th sample from the dataset.

Parameters:

n (int) – The index of the sample to be loaded

Returns:

Tuple of the following items;

Tensor:

Waveform

int:

Sample rate

int:

Num frames

str:

Track name

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources