Datasets:
script used to remaster the original dataset in the audiofolder format
Browse files- darija10.py +2 -3
darija10.py
CHANGED
@@ -16,7 +16,7 @@ for file in Path("dvoice-v1.0/transcriptions/csv").iterdir():
|
|
16 |
columns = reader.fieldnames
|
17 |
for row in reader:
|
18 |
audio_path = Path(row["path"])
|
19 |
-
row["path"] = audio_path.name
|
20 |
shutil.copy(Path("dvoice-v1.0/audios_fixed") / audio_path, split_audios_path)
|
21 |
all_rows.append(row)
|
22 |
|
@@ -28,5 +28,4 @@ with (Path("darija10") / "metadata.csv").open("w", newline='', encoding="utf-8")
|
|
28 |
row["file_name"] = row["path"]
|
29 |
del row["path"]
|
30 |
writer.writerow(row)
|
31 |
-
|
32 |
-
|
|
|
16 |
columns = reader.fieldnames
|
17 |
for row in reader:
|
18 |
audio_path = Path(row["path"])
|
19 |
+
row["path"] = Path("data") / split / audio_path.name
|
20 |
shutil.copy(Path("dvoice-v1.0/audios_fixed") / audio_path, split_audios_path)
|
21 |
all_rows.append(row)
|
22 |
|
|
|
28 |
row["file_name"] = row["path"]
|
29 |
del row["path"]
|
30 |
writer.writerow(row)
|
31 |
+
|
|