tobiolatunji commited on
Commit
b179fcd
1 Parent(s): b74379f

add config logging

Browse files
Files changed (1) hide show
  1. afrispeech-200.py +2 -1
afrispeech-200.py CHANGED
@@ -191,6 +191,7 @@ class AfriSpeech(datasets.GeneratorBasedBuilder):
191
 
192
  data_fields = [key for key in self._info().features.keys() if key not in ["audio", "path"]]
193
  metadata = {}
 
194
  with open(meta_path, "r", encoding="utf-8") as f:
195
  reader = csv.DictReader(f)
196
  for row in tqdm(reader, desc="Reading metadata..."):
@@ -201,7 +202,7 @@ class AfriSpeech(datasets.GeneratorBasedBuilder):
201
  metadata[audio_id] = {field: row.get(field, "") for field in data_fields}
202
 
203
  for i, audio_archive in enumerate(archives):
204
- for filename, file in audio_archive:
205
  # _, filename = os.path.split(filename)
206
  filename = "/".join(filename.split("/")[-2:])
207
  if filename in metadata:
 
191
 
192
  data_fields = [key for key in self._info().features.keys() if key not in ["audio", "path"]]
193
  metadata = {}
194
+ print("config:", self.config.name)
195
  with open(meta_path, "r", encoding="utf-8") as f:
196
  reader = csv.DictReader(f)
197
  for row in tqdm(reader, desc="Reading metadata..."):
 
202
  metadata[audio_id] = {field: row.get(field, "") for field in data_fields}
203
 
204
  for i, audio_archive in enumerate(archives):
205
+ for filename, file in tqdm(audio_archive, desc="Extracting audios..."):
206
  # _, filename = os.path.split(filename)
207
  filename = "/".join(filename.split("/")[-2:])
208
  if filename in metadata: