soeren commited on
Commit
03e513d
1 Parent(s): c624b60

correct alignment throughout

Browse files
Files changed (1) hide show
  1. speech_commands_enriched.py +2 -3
speech_commands_enriched.py CHANGED
@@ -229,9 +229,8 @@ class SpeechCommands(datasets.GeneratorBasedBuilder):
229
  # HINT: metadata should already be the split-specific metadata
230
 
231
  pathlist = Path(archive_path).glob('**/*.wav')
232
- # sort _silence_ after all the other paths; aligns metadata to data as data is not sorted by #
233
- # ascending order
234
- pathlist = sorted(pathlist, key=lambda d: str(d).lower().replace("_", "{"))
235
 
236
  for path, row in zip(pathlist, metadata.iterrows()):
237
 
 
229
  # HINT: metadata should already be the split-specific metadata
230
 
231
  pathlist = Path(archive_path).glob('**/*.wav')
232
+ # align metadata and data
233
+ pathlist= sorted(pathlist)
 
234
 
235
  for path, row in zip(pathlist, metadata.iterrows()):
236