PerSets commited on
Commit
265066d
·
1 Parent(s): 266bec6

fix: new approach

Browse files
Files changed (1) hide show
  1. asr_dataset.py +4 -4
asr_dataset.py CHANGED
@@ -113,12 +113,12 @@ class ASRDataset(datasets.GeneratorBasedBuilder):
113
  inside_clips_dir = False
114
  id_ = 0
115
  for path, f in audio_files:
116
- print('path: ', path)
117
  if path.startswith(path_to_clips):
 
118
  inside_clips_dir = True
119
- if path in examples:
120
- audio = {"path": path, "bytes": f.read()}
121
- yield id_, {**examples[path], "audio": audio}
122
  id_ += 1
123
  elif inside_clips_dir:
124
  break
 
113
  inside_clips_dir = False
114
  id_ = 0
115
  for path, f in audio_files:
 
116
  if path.startswith(path_to_clips):
117
+ audio_path2 = "/".join([path_to_clips, path])
118
  inside_clips_dir = True
119
+ if audio_path2 in examples:
120
+ audio = {"path": audio_path2, "bytes": f.read()}
121
+ yield id_, {**examples[audio_path2], "audio": audio}
122
  id_ += 1
123
  elif inside_clips_dir:
124
  break