Commit
·
7dd0ea4
1
Parent(s):
e4f7b4f
fix split indexing for single-accent configs
Browse files- afrispeech-200.py +2 -2
afrispeech-200.py
CHANGED
@@ -188,7 +188,7 @@ 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 |
-
|
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'])
|
@@ -211,7 +211,7 @@ class AfriSpeech(datasets.GeneratorBasedBuilder):
|
|
211 |
"dev": datasets.Split.VALIDATION,
|
212 |
# "test": datasets.Split.TEST,
|
213 |
}
|
214 |
-
for split in
|
215 |
split_generators.append(
|
216 |
datasets.SplitGenerator(
|
217 |
name=split_names.get(split, 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[accent]:
|
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'])
|
|
|
211 |
"dev": datasets.Split.VALIDATION,
|
212 |
# "test": datasets.Split.TEST,
|
213 |
}
|
214 |
+
for split in audio_urls.keys():
|
215 |
split_generators.append(
|
216 |
datasets.SplitGenerator(
|
217 |
name=split_names.get(split, split),
|