yangwang825 commited on
Commit
845fdeb
·
verified ·
1 Parent(s): 88b9417

Update audioset.py

Browse files
Files changed (1) hide show
  1. audioset.py +10 -7
audioset.py CHANGED
@@ -205,13 +205,16 @@ class AudioSet(datasets.GeneratorBasedBuilder):
205
  for guid, audio_path in enumerate(_walker):
206
  if Path(audio_path).name in bad_zip_files:
207
  continue
208
- yield guid, {
209
- "id": str(guid),
210
- "file": audio_path,
211
- "audio": audio_path,
212
- "sound": default_find_classes(audio_path),
213
- "label": default_find_classes(audio_path),
214
- }
 
 
 
215
 
216
 
217
  def flatten(list2d):
 
205
  for guid, audio_path in enumerate(_walker):
206
  if Path(audio_path).name in bad_zip_files:
207
  continue
208
+ try:
209
+ yield guid, {
210
+ "id": str(guid),
211
+ "file": audio_path,
212
+ "audio": audio_path,
213
+ "sound": default_find_classes(audio_path),
214
+ "label": default_find_classes(audio_path),
215
+ }
216
+ except:
217
+ continue
218
 
219
 
220
  def flatten(list2d):