Commit
•
b4bb17d
1
Parent(s):
7094add
Update test.py
Browse files
test.py
CHANGED
@@ -86,7 +86,7 @@ class TestASR(datasets.GeneratorBasedBuilder):
|
|
86 |
)
|
87 |
|
88 |
def _split_generators(self, dl_manager):
|
89 |
-
archive_path = dl_manager.
|
90 |
meta_path = dl_manager.download(_PROMPTS_URLS)
|
91 |
return [datasets.SplitGenerator(
|
92 |
name=datasets.Split.TEST,
|
@@ -103,12 +103,12 @@ class TestASR(datasets.GeneratorBasedBuilder):
|
|
103 |
next(f)
|
104 |
for row in f:
|
105 |
print(row)
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
|
113 |
id_ = 0
|
114 |
for path, f in audio_files:
|
|
|
86 |
)
|
87 |
|
88 |
def _split_generators(self, dl_manager):
|
89 |
+
archive_path = dl_manager.download_and_extract(_DATA_URL)
|
90 |
meta_path = dl_manager.download(_PROMPTS_URLS)
|
91 |
return [datasets.SplitGenerator(
|
92 |
name=datasets.Split.TEST,
|
|
|
103 |
next(f)
|
104 |
for row in f:
|
105 |
print(row)
|
106 |
+
r = row.split(r"\t")
|
107 |
+
print(r)
|
108 |
+
audio_id = r[0]
|
109 |
+
ngram = r[1]
|
110 |
+
metadata[audio_id] = {"audio_id": audio_id,
|
111 |
+
"ngram": ngram}
|
112 |
|
113 |
id_ = 0
|
114 |
for path, f in audio_files:
|