tobiolatunji
commited on
Commit
·
4701e10
1
Parent(s):
9d61f37
unlock test set audios
Browse files- afrispeech-200.py +5 -4
afrispeech-200.py
CHANGED
@@ -83,7 +83,7 @@ _HOMEPAGE = "https://github.com/intron-innovation/AfriSpeech-Dataset-Paper"
|
|
83 |
|
84 |
_LICENSE = "http://creativecommons.org/licenses/by-nc-sa/4.0/"
|
85 |
|
86 |
-
|
87 |
|
88 |
_AUDIO_URL = "audio/{accent}/{split}/{split}_{accent}_{shard_idx}.tar.gz"
|
89 |
_AUDIO_URL_ALL = "audio/{split}/{split}_{shard_idx}.tar.gz"
|
@@ -179,7 +179,7 @@ class AfriSpeech(datasets.GeneratorBasedBuilder):
|
|
179 |
n_shards = _SHARDS
|
180 |
|
181 |
audio_urls = {}
|
182 |
-
splits = ("train", "dev"
|
183 |
for split in splits:
|
184 |
if self.config.name == 'all':
|
185 |
audio_urls[split] = []
|
@@ -188,7 +188,8 @@ class AfriSpeech(datasets.GeneratorBasedBuilder):
|
|
188 |
continue
|
189 |
for i in range(ACCENT_STATS[accent][split]['shards']):
|
190 |
audio_urls[split].append(_AUDIO_URL.format(accent=accent, split=split, shard_idx=i))
|
191 |
-
elif split in ACCENT_STATS[
|
|
|
192 |
audio_urls[split] = [
|
193 |
_AUDIO_URL.format(accent=accent, split=split,
|
194 |
shard_idx=i) for i in range(ACCENT_STATS[accent][split]['shards'])
|
@@ -210,7 +211,7 @@ class AfriSpeech(datasets.GeneratorBasedBuilder):
|
|
210 |
split_names = {
|
211 |
"train": datasets.Split.TRAIN,
|
212 |
"dev": datasets.Split.VALIDATION,
|
213 |
-
|
214 |
}
|
215 |
|
216 |
for split in splits:
|
|
|
83 |
|
84 |
_LICENSE = "http://creativecommons.org/licenses/by-nc-sa/4.0/"
|
85 |
|
86 |
+
_BASE_URL = "https://huggingface.co/datasets/tobiolatunji/afrispeech-200/resolve/main/"
|
87 |
|
88 |
_AUDIO_URL = "audio/{accent}/{split}/{split}_{accent}_{shard_idx}.tar.gz"
|
89 |
_AUDIO_URL_ALL = "audio/{split}/{split}_{shard_idx}.tar.gz"
|
|
|
179 |
n_shards = _SHARDS
|
180 |
|
181 |
audio_urls = {}
|
182 |
+
splits = ("train", "dev", "test")
|
183 |
for split in splits:
|
184 |
if self.config.name == 'all':
|
185 |
audio_urls[split] = []
|
|
|
188 |
continue
|
189 |
for i in range(ACCENT_STATS[accent][split]['shards']):
|
190 |
audio_urls[split].append(_AUDIO_URL.format(accent=accent, split=split, shard_idx=i))
|
191 |
+
elif split in ACCENT_STATS[self.config.name]:
|
192 |
+
accent = self.config.name
|
193 |
audio_urls[split] = [
|
194 |
_AUDIO_URL.format(accent=accent, split=split,
|
195 |
shard_idx=i) for i in range(ACCENT_STATS[accent][split]['shards'])
|
|
|
211 |
split_names = {
|
212 |
"train": datasets.Split.TRAIN,
|
213 |
"dev": datasets.Split.VALIDATION,
|
214 |
+
"test": datasets.Split.TEST,
|
215 |
}
|
216 |
|
217 |
for split in splits:
|