taqwa92 commited on
Commit
1097954
1 Parent(s): 70f0027

Update mg21_data.py

Browse files
Files changed (1) hide show
  1. mg21_data.py +6 -1
mg21_data.py CHANGED
@@ -145,6 +145,11 @@ class MGDB2Dataset(datasets.GeneratorBasedBuilder):
145
  #file_contents = f.read()
146
  #print (file_contents)
147
  #f.close()
 
 
 
 
 
148
 
149
  return [
150
  datasets.SplitGenerator(
@@ -172,7 +177,7 @@ class MGDB2Dataset(datasets.GeneratorBasedBuilder):
172
  gen_kwargs={
173
  "path_to_txt": train_dir + "/txt",
174
  "path_to_wav": train_dir + "/wav",
175
- "wav_files": [absoluteFilePaths(dl_manager.extract(a)) for a in wav_archive['train']],
176
  "txt_files": absoluteFilePaths(dl_manager.extract(txt_archive['train'])),
177
  "data_type":0,
178
  },
 
145
  #file_contents = f.read()
146
  #print (file_contents)
147
  #f.close()
148
+
149
+ wav_list = []
150
+ for arc in wav_archive['train']:
151
+ for wav_name in absoluteFilePaths(dl_manager.extract(arc)):
152
+ wav_list.append(wav_name)
153
 
154
  return [
155
  datasets.SplitGenerator(
 
177
  gen_kwargs={
178
  "path_to_txt": train_dir + "/txt",
179
  "path_to_wav": train_dir + "/wav",
180
+ "wav_files": wav_list,
181
  "txt_files": absoluteFilePaths(dl_manager.extract(txt_archive['train'])),
182
  "data_type":0,
183
  },