[email protected]
commited on
Commit
•
7fdf7f3
1
Parent(s):
7cb1537
fix url
Browse files- Cylonix_ASR_dataset.py +5 -9
Cylonix_ASR_dataset.py
CHANGED
@@ -49,7 +49,7 @@ _AUDIO_URL = _BASE_URL + "audio/{lang}/{split}/{lang}_{split}_{shard_idx}.tar"
|
|
49 |
|
50 |
_TRANSCRIPT_URL = _BASE_URL + "transcript/{lang}/{split}.tsv"
|
51 |
|
52 |
-
_N_SHARDS_URL = _BASE_URL + "
|
53 |
|
54 |
|
55 |
class CommonVoiceConfig(datasets.BuilderConfig):
|
@@ -124,14 +124,10 @@ class CommonVoice(datasets.GeneratorBasedBuilder):
|
|
124 |
|
125 |
def _split_generators(self, dl_manager):
|
126 |
lang = self.config.name
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
"zh-CN": {
|
132 |
-
"train": 1
|
133 |
-
}
|
134 |
-
}
|
135 |
audio_urls = {}
|
136 |
splits = ("train",)
|
137 |
for split in splits:
|
|
|
49 |
|
50 |
_TRANSCRIPT_URL = _BASE_URL + "transcript/{lang}/{split}.tsv"
|
51 |
|
52 |
+
_N_SHARDS_URL = _BASE_URL + "n_shards.json"
|
53 |
|
54 |
|
55 |
class CommonVoiceConfig(datasets.BuilderConfig):
|
|
|
124 |
|
125 |
def _split_generators(self, dl_manager):
|
126 |
lang = self.config.name
|
127 |
+
n_shards_path = dl_manager.download_and_extract(_N_SHARDS_URL)
|
128 |
+
with open(n_shards_path, encoding="utf-8") as f:
|
129 |
+
n_shards = json.load(f)
|
130 |
+
|
|
|
|
|
|
|
|
|
131 |
audio_urls = {}
|
132 |
splits = ("train",)
|
133 |
for split in splits:
|