[email protected]
commited on
Commit
•
09effbc
1
Parent(s):
268acd9
fix
Browse files- Cylonix_ASR_dataset.py +9 -5
- count_n_shards.py +1 -1
- n_shards.json +1 -2
Cylonix_ASR_dataset.py
CHANGED
@@ -132,12 +132,16 @@ class CommonVoice(datasets.GeneratorBasedBuilder):
|
|
132 |
|
133 |
def _split_generators(self, dl_manager):
|
134 |
lang = self.config.name
|
135 |
-
n_shards_path = dl_manager.download_and_extract(_N_SHARDS_URL)
|
136 |
-
with open(n_shards_path, encoding="utf-8") as f:
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
139 |
audio_urls = {}
|
140 |
-
splits = ("train",
|
141 |
for split in splits:
|
142 |
audio_urls[split] = [
|
143 |
_AUDIO_URL.format(lang=lang, split=split, shard_idx=i) for i in range(n_shards[lang][split])
|
|
|
132 |
|
133 |
def _split_generators(self, dl_manager):
|
134 |
lang = self.config.name
|
135 |
+
# n_shards_path = dl_manager.download_and_extract(_N_SHARDS_URL)
|
136 |
+
# with open(n_shards_path, encoding="utf-8") as f:
|
137 |
+
# n_shards = json.load(f)
|
138 |
+
n_shards = {
|
139 |
+
"zh_CN": {
|
140 |
+
"train": 1
|
141 |
+
}
|
142 |
+
}
|
143 |
audio_urls = {}
|
144 |
+
splits = ("train",)
|
145 |
for split in splits:
|
146 |
audio_urls[split] = [
|
147 |
_AUDIO_URL.format(lang=lang, split=split, shard_idx=i) for i in range(n_shards[lang][split])
|
count_n_shards.py
CHANGED
@@ -2,7 +2,7 @@ from pathlib import Path
|
|
2 |
import json
|
3 |
|
4 |
|
5 |
-
splits = ["train"
|
6 |
|
7 |
if __name__ == "__main__":
|
8 |
n_files = {}
|
|
|
2 |
import json
|
3 |
|
4 |
|
5 |
+
splits = ["train"]
|
6 |
|
7 |
if __name__ == "__main__":
|
8 |
n_files = {}
|
n_shards.json
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
{
|
2 |
"zh_CN": {
|
3 |
-
"train": 1
|
4 |
-
"test": 1
|
5 |
}
|
6 |
}
|
|
|
1 |
{
|
2 |
"zh_CN": {
|
3 |
+
"train": 1
|
|
|
4 |
}
|
5 |
}
|