Commit
•
7094add
1
Parent(s):
969b9a0
Update test.py
Browse files
test.py
CHANGED
@@ -100,13 +100,15 @@ class TestASR(datasets.GeneratorBasedBuilder):
|
|
100 |
"""Lorem ipsum."""
|
101 |
metadata = {}
|
102 |
with open(meta_path, encoding="utf-8") as f:
|
|
|
103 |
for row in f:
|
104 |
print(row)
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
110 |
|
111 |
id_ = 0
|
112 |
for path, f in audio_files:
|
|
|
100 |
"""Lorem ipsum."""
|
101 |
metadata = {}
|
102 |
with open(meta_path, encoding="utf-8") as f:
|
103 |
+
next(f)
|
104 |
for row in f:
|
105 |
print(row)
|
106 |
+
if not row.startswith("audio_id"):
|
107 |
+
r = row.split(r"\t")
|
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:
|