Update fleurs.py
Browse files
fleurs.py
CHANGED
@@ -101,8 +101,8 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
101 |
"num_samples": datasets.Value("int32"),
|
102 |
"path": datasets.Value("string"),
|
103 |
"audio": datasets.Audio(sampling_rate=16_000),
|
104 |
-
"
|
105 |
-
"
|
106 |
"gender": datasets.ClassLabel(names=["male", "female", "other"]),
|
107 |
"lang_id": datasets.ClassLabel(names=langs),
|
108 |
"language": datasets.Value("string"),
|
@@ -115,7 +115,7 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
115 |
return datasets.DatasetInfo(
|
116 |
description=self.config.description + "\n" + _DESCRIPTION,
|
117 |
features=features,
|
118 |
-
supervised_keys=("audio", "
|
119 |
homepage=self.config.homepage,
|
120 |
citation=self.config.citation + "\n" + _CITATION,
|
121 |
task_templates=task_templates,
|
@@ -176,8 +176,8 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
176 |
(
|
177 |
_id,
|
178 |
file_name,
|
179 |
-
|
180 |
-
|
181 |
_,
|
182 |
num_samples,
|
183 |
gender,
|
@@ -187,8 +187,8 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
187 |
|
188 |
data[file_name] = {
|
189 |
"id": int(_id),
|
190 |
-
"
|
191 |
-
"
|
192 |
"num_samples": int(num_samples),
|
193 |
"gender": gender_to_id[gender],
|
194 |
"lang_id": _FLEURS_LANG.index(lang_id),
|
|
|
101 |
"num_samples": datasets.Value("int32"),
|
102 |
"path": datasets.Value("string"),
|
103 |
"audio": datasets.Audio(sampling_rate=16_000),
|
104 |
+
"spaced": datasets.Value("string"),
|
105 |
+
"sentence": datasets.Value("string"),
|
106 |
"gender": datasets.ClassLabel(names=["male", "female", "other"]),
|
107 |
"lang_id": datasets.ClassLabel(names=langs),
|
108 |
"language": datasets.Value("string"),
|
|
|
115 |
return datasets.DatasetInfo(
|
116 |
description=self.config.description + "\n" + _DESCRIPTION,
|
117 |
features=features,
|
118 |
+
supervised_keys=("audio", "spaced"),
|
119 |
homepage=self.config.homepage,
|
120 |
citation=self.config.citation + "\n" + _CITATION,
|
121 |
task_templates=task_templates,
|
|
|
176 |
(
|
177 |
_id,
|
178 |
file_name,
|
179 |
+
sentence,
|
180 |
+
spaced,
|
181 |
_,
|
182 |
num_samples,
|
183 |
gender,
|
|
|
187 |
|
188 |
data[file_name] = {
|
189 |
"id": int(_id),
|
190 |
+
"sentence": sentence,
|
191 |
+
"spaced": spaced,
|
192 |
"num_samples": int(num_samples),
|
193 |
"gender": gender_to_id[gender],
|
194 |
"lang_id": _FLEURS_LANG.index(lang_id),
|