Update librispeech-script.py
Browse files- librispeech-script.py +2 -2
librispeech-script.py
CHANGED
|
@@ -71,9 +71,9 @@ class LibriSpeech(datasets.GeneratorBasedBuilder):
|
|
| 71 |
_, _walker = fast_scandir(archive_path, extensions, recursive=True)
|
| 72 |
|
| 73 |
if split == 'train':
|
| 74 |
-
_walker = [fileid for fileid in _walker if Path(fileid).
|
| 75 |
elif split == 'test':
|
| 76 |
-
_walker = [fileid for fileid in _walker if Path(fileid).
|
| 77 |
|
| 78 |
def default_find_classes(audio_path):
|
| 79 |
return Path(audio_path).stem.split('-')[0]
|
|
|
|
| 71 |
_, _walker = fast_scandir(archive_path, extensions, recursive=True)
|
| 72 |
|
| 73 |
if split == 'train':
|
| 74 |
+
_walker = [fileid for fileid in _walker if Path(fileid).name in OFFICIAL_TRAIN]
|
| 75 |
elif split == 'test':
|
| 76 |
+
_walker = [fileid for fileid in _walker if Path(fileid).name in OFFICIAL_TEST]
|
| 77 |
|
| 78 |
def default_find_classes(audio_path):
|
| 79 |
return Path(audio_path).stem.split('-')[0]
|