LJSPEECH — Torchaudio 2.7.0 documentation (original) (raw)
class torchaudio.datasets.LJSPEECH(root: Union[str, Path], url: str = 'https://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2', folder_in_archive: str = 'wavs', download: bool = False)[source]¶
LJSpeech-1.1 [Ito and Johnson, 2017] dataset.
Parameters:
- root (str or Path) – Path to the directory where the dataset is found or downloaded.
- url (str, optional) – The URL to download the dataset from. (default:
"https://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2"
) - folder_in_archive (str, optional) – The top-level directory of the dataset. (default:
"wavs"
) - download (bool, optional) – Whether to download the dataset if it is not found at root path. (default:
False
).
__getitem__¶
LJSPEECH.__getitem__(n: int) → Tuple[Tensor, int, 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
str:
Transcript
str:
Normalized Transcript