Commit
·
a6d70c1
1
Parent(s):
d36c78e
Remove loops
Browse files
test.py
CHANGED
@@ -299,9 +299,6 @@ class VoxCeleb(datasets.GeneratorBasedBuilder):
|
|
299 |
)
|
300 |
|
301 |
for path in paths[conf]:
|
302 |
-
for w in path:
|
303 |
-
raise Exception(w)
|
304 |
-
#raise Exception([x for x in dl_manager.iter_files(path)])
|
305 |
#raise Exception([x for x in Path(path).glob('**/*')])
|
306 |
# def find_mount_point(path):
|
307 |
# path = os.path.realpath(path)
|
@@ -309,34 +306,27 @@ class VoxCeleb(datasets.GeneratorBasedBuilder):
|
|
309 |
# path = os.path.dirname(path)
|
310 |
# return path
|
311 |
# raise Exception(find_mount_point(path))
|
312 |
-
subdirs = [x[0] for x in os.walk(path)]
|
313 |
#raise Exception(subdirs)
|
314 |
|
315 |
|
316 |
#raise Exception(os.is_symlink(path))
|
317 |
#raise Exception(os.listdir(path))
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
if dataset_id == "vox1":
|
337 |
-
info["speaker_name"] = speaker_info["VGGFace1 ID"]
|
338 |
-
info["speaker_nationality"] = speaker_info["Nationality"]
|
339 |
-
if conf.startswith("audio"):
|
340 |
-
info["audio"] = info["file"]
|
341 |
-
yield key, info
|
342 |
-
key += 1
|
|
|
299 |
)
|
300 |
|
301 |
for path in paths[conf]:
|
|
|
|
|
|
|
302 |
#raise Exception([x for x in Path(path).glob('**/*')])
|
303 |
# def find_mount_point(path):
|
304 |
# path = os.path.realpath(path)
|
|
|
306 |
# path = os.path.dirname(path)
|
307 |
# return path
|
308 |
# raise Exception(find_mount_point(path))
|
309 |
+
#subdirs = [x[0] for x in os.walk(path)]
|
310 |
#raise Exception(subdirs)
|
311 |
|
312 |
|
313 |
#raise Exception(os.is_symlink(path))
|
314 |
#raise Exception(os.listdir(path))
|
315 |
+
dataset_format,speaker_path,video_id,clip_index= url.split("::")[0].split("/")[2:]
|
316 |
+
clip_index = int(Path(clip_index).stem)
|
317 |
+
info = {
|
318 |
+
"file": str(clip),
|
319 |
+
"file_format": dataset_format,
|
320 |
+
"dataset_id": dataset_id,
|
321 |
+
"speaker_id": speaker,
|
322 |
+
"speaker_gender": speaker_info["Gender"],
|
323 |
+
"video_id": video_id,
|
324 |
+
"clip_index": clip_index,
|
325 |
+
}
|
326 |
+
if dataset_id == "vox1":
|
327 |
+
info["speaker_name"] = speaker_info["VGGFace1 ID"]
|
328 |
+
info["speaker_nationality"] = speaker_info["Nationality"]
|
329 |
+
if conf.startswith("audio"):
|
330 |
+
info["audio"] = info["file"]
|
331 |
+
yield key, info
|
332 |
+
key += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|