yangwang825 commited on
Commit
dbbace9
·
verified ·
1 Parent(s): 30b86ca

Update librispeech-script.py

Browse files
Files changed (1) hide show
  1. 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).stem in OFFICIAL_TRAIN]
75
  elif split == 'test':
76
- _walker = [fileid for fileid in _walker if Path(fileid).stem in OFFICIAL_TEST]
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]