Commit
·
7e25ca4
1
Parent(s):
97aa253
Update test.py
Browse files
test.py
CHANGED
@@ -299,28 +299,29 @@ class VoxCeleb(datasets.GeneratorBasedBuilder):
|
|
299 |
index_col=0,
|
300 |
engine="python",
|
301 |
)
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
|
|
|
299 |
index_col=0,
|
300 |
engine="python",
|
301 |
)
|
302 |
+
for path in paths[conf]:
|
303 |
+
dataset_path = next(Path(path).iterdir())
|
304 |
+
dataset_format = dataset_path.name
|
305 |
+
for speaker_path in dataset_path.iterdir():
|
306 |
+
speaker = speaker_path.name
|
307 |
+
speaker_info = meta.loc[speaker]
|
308 |
+
for video in speaker_path.iterdir():
|
309 |
+
video_id = video.name
|
310 |
+
for clip in video.iterdir():
|
311 |
+
clip_index = int(clip.stem)
|
312 |
+
info = {
|
313 |
+
"file": str(clip),
|
314 |
+
"file_format": dataset_format,
|
315 |
+
"dataset_id": dataset_id,
|
316 |
+
"speaker_id": speaker,
|
317 |
+
"speaker_gender": speaker_info["Gender"],
|
318 |
+
"video_id": video_id,
|
319 |
+
"clip_index": clip_index,
|
320 |
+
}
|
321 |
+
if dataset_id == "vox1":
|
322 |
+
info["speaker_name"] = speaker_info["VGGFace1 ID"]
|
323 |
+
info["speaker_nationality"] = speaker_info["Nationality"]
|
324 |
+
if conf.startswith("audio"):
|
325 |
+
info["audio"] = info["file"]
|
326 |
+
yield key, info
|
327 |
+
key += 1
|