Update audioset.py
Browse files- 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 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
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):
|