COMMONVOICE¶
- class torchaudio.datasets.COMMONVOICE(root: Union[str, Path], tsv: str = 'train.tsv')[source]¶
CommonVoice [Ardila et al., 2020] dataset.
- Parameters
root (str or Path) – Path to the directory where the dataset is located. (Where the
tsvfile is present.)tsv (str, optional) – The name of the tsv file used to construct the metadata, such as
"train.tsv","test.tsv","dev.tsv","invalidated.tsv","validated.tsv"and"other.tsv". (default:"train.tsv")
__getitem__¶
- COMMONVOICE.__getitem__(n: int) Tuple[Tensor, int, Dict[str, 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
- Dict[str, str]:
Dictionary containing the following items from the corresponding TSV file;
"client_id""path""sentence""up_votes""down_votes""age""gender""accent"