Georgios Spithourakis commited on
Commit ·
6bbc562
1
Parent(s): 4520017
Update evi.py
Browse files
evi.py
CHANGED
|
@@ -45,7 +45,7 @@ _HOMEPAGE_URL = "https://arxiv.org/abs/2204.13496"
|
|
| 45 |
|
| 46 |
_AUDIO_DATA_URL = "https://poly-public-data.s3.eu-west-2.amazonaws.com/evi-paper/audios.zip" # noqa
|
| 47 |
|
| 48 |
-
_VERSION = datasets.Version("0.0.
|
| 49 |
|
| 50 |
|
| 51 |
class EviConfig(datasets.BuilderConfig):
|
|
@@ -114,7 +114,7 @@ class Evi(datasets.GeneratorBasedBuilder):
|
|
| 114 |
)
|
| 115 |
|
| 116 |
def _split_generators(self, dl_manager):
|
| 117 |
-
langs =
|
| 118 |
|
| 119 |
# audio_path = dl_manager.download_and_extract(
|
| 120 |
# self.config.audio_data_url
|
|
@@ -137,7 +137,7 @@ class Evi(datasets.GeneratorBasedBuilder):
|
|
| 137 |
}
|
| 138 |
return [
|
| 139 |
datasets.SplitGenerator(
|
| 140 |
-
name=datasets.Split.
|
| 141 |
gen_kwargs={
|
| 142 |
"audio_paths": lang2audio_path,
|
| 143 |
"text_paths": lang2text_path,
|
|
@@ -177,4 +177,13 @@ class Evi(datasets.GeneratorBasedBuilder):
|
|
| 177 |
}
|
| 178 |
print(example)
|
| 179 |
yield key, example
|
| 180 |
-
key += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
_AUDIO_DATA_URL = "https://poly-public-data.s3.eu-west-2.amazonaws.com/evi-paper/audios.zip" # noqa
|
| 47 |
|
| 48 |
+
_VERSION = datasets.Version("0.0.7", "")
|
| 49 |
|
| 50 |
|
| 51 |
class EviConfig(datasets.BuilderConfig):
|
|
|
|
| 114 |
)
|
| 115 |
|
| 116 |
def _split_generators(self, dl_manager):
|
| 117 |
+
langs = [self.config.name]
|
| 118 |
|
| 119 |
# audio_path = dl_manager.download_and_extract(
|
| 120 |
# self.config.audio_data_url
|
|
|
|
| 137 |
}
|
| 138 |
return [
|
| 139 |
datasets.SplitGenerator(
|
| 140 |
+
name=datasets.Split.TRAIN,
|
| 141 |
gen_kwargs={
|
| 142 |
"audio_paths": lang2audio_path,
|
| 143 |
"text_paths": lang2text_path,
|
|
|
|
| 177 |
}
|
| 178 |
print(example)
|
| 179 |
yield key, example
|
| 180 |
+
key += 1
|
| 181 |
+
|
| 182 |
+
#
|
| 183 |
+
# if __name__ == '__main__':
|
| 184 |
+
# d = Evi(name='fr-FR')
|
| 185 |
+
# d.download_and_prepare()
|
| 186 |
+
# d = d.as_dataset(datasets.Split.TRAIN)
|
| 187 |
+
# print(d)
|
| 188 |
+
# for e in d:
|
| 189 |
+
# print(e)
|