Libri TTS dataset vocoder
LibriTTSDatasetVocoder
Bases: Dataset
Loading preprocessed univnet model data.
Source code in training/datasets/libritts_dataset_vocoder.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
__getitem__(idx)
Returns a sample from the dataset at the given index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idx |
int
|
Index of the sample to return. |
required |
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict[str, Any]: A dictionary containing the sample data. |
Source code in training/datasets/libritts_dataset_vocoder.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
__init__(root, batch_size, download=True, lang='en')
A PyTorch dataset for loading preprocessed univnet data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
root |
str
|
Path to the directory where the dataset is found or downloaded. |
required |
batch_size |
int
|
Batch size for the dataset. |
required |
download |
bool
|
Whether to download the dataset if it is not found. Defaults to True. |
True
|
Source code in training/datasets/libritts_dataset_vocoder.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
__len__()
Returns the number of samples in the dataset.
Returns int: Number of samples in the dataset.
Source code in training/datasets/libritts_dataset_vocoder.py
38 39 40 41 42 43 44 |
|
collate_fn(data)
Collates a batch of data samples.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
List
|
A list of data samples. |
required |
Returns:
Name | Type | Description |
---|---|---|
List |
List
|
A list of reprocessed data batches. |
Source code in training/datasets/libritts_dataset_vocoder.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|