DCNemesis commited on
Commit
a7be19d
1 Parent(s): 2abf64b

add debug code

Browse files
Files changed (1) hide show
  1. audio-keyword-spotting.py +2 -1
audio-keyword-spotting.py CHANGED
@@ -121,6 +121,7 @@ class AudioKeywordSpotting(datasets.GeneratorBasedBuilder):
121
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
122
  def _generate_examples(self, audio_dir, data, split):
123
  for key, row in enumerate(data):
 
124
  try:
125
  tfile = os.path.join(audio_dir, row['file'])
126
  if not tfile.endswith('.wav'):
@@ -137,7 +138,7 @@ class AudioKeywordSpotting(datasets.GeneratorBasedBuilder):
137
  }
138
  except Exception as e:
139
  print(e)
140
- print('audio_dir', row['file'])
141
  print(os.path.join(audio_dir, row['file']))
142
  print(f'In split {split}: {row["file"]} failed to download. Data may be missing.')
143
  pass
 
121
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
122
  def _generate_examples(self, audio_dir, data, split):
123
  for key, row in enumerate(data):
124
+ print(key, row)
125
  try:
126
  tfile = os.path.join(audio_dir, row['file'])
127
  if not tfile.endswith('.wav'):
 
138
  }
139
  except Exception as e:
140
  print(e)
141
+ print(audio_dir, row['file'])
142
  print(os.path.join(audio_dir, row['file']))
143
  print(f'In split {split}: {row["file"]} failed to download. Data may be missing.')
144
  pass