Spaces:
Runtime error
Runtime error
Update len fn
Browse files- dataset.py +1 -5
dataset.py
CHANGED
@@ -29,11 +29,7 @@ class VoiceDataset(Dataset):
|
|
29 |
self.num_samples = time_limit_in_secs * self.target_sample_rate
|
30 |
|
31 |
def __len__(self):
|
32 |
-
|
33 |
-
for label in self._labels:
|
34 |
-
label_path = os.path.join(self._data_path, label)
|
35 |
-
total_audio_files += len(os.listdir(label_path))
|
36 |
-
return total_audio_files
|
37 |
|
38 |
def __getitem__(self, index):
|
39 |
# get file
|
|
|
29 |
self.num_samples = time_limit_in_secs * self.target_sample_rate
|
30 |
|
31 |
def __len__(self):
|
32 |
+
return len(self.audio_files_labels)
|
|
|
|
|
|
|
|
|
33 |
|
34 |
def __getitem__(self, index):
|
35 |
# get file
|