Datasets:
Modalities:
Text
Size:
10K - 100K
dvoice11
Browse files- common_voice_11_0.py +5 -0
common_voice_11_0.py
CHANGED
@@ -166,7 +166,12 @@ class CommonVoice(datasets.GeneratorBasedBuilder):
|
|
166 |
with open(meta_path, encoding="utf-8") as f:
|
167 |
reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
|
168 |
for row in tqdm(reader, desc="Reading metadata..."):
|
|
|
|
|
169 |
# accent -> accents in CV 8.0
|
|
|
|
|
|
|
170 |
# if data is incomplete, fill with empty values
|
171 |
for field in data_fields:
|
172 |
if field not in row:
|
|
|
166 |
with open(meta_path, encoding="utf-8") as f:
|
167 |
reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
|
168 |
for row in tqdm(reader, desc="Reading metadata..."):
|
169 |
+
if not row["path"].endswith(".mp3"):
|
170 |
+
row["path"] += ".mp3"
|
171 |
# accent -> accents in CV 8.0
|
172 |
+
if "accents" in row:
|
173 |
+
row["accent"] = row["accents"]
|
174 |
+
del row["accents"]
|
175 |
# if data is incomplete, fill with empty values
|
176 |
for field in data_fields:
|
177 |
if field not in row:
|