Datasets:
Faton Rekathati
commited on
Commit
•
f840afe
1
Parent(s):
bec891b
Fix yet another arg name
Browse files
rixvox.py
CHANGED
@@ -142,8 +142,8 @@ class Rixvox(datasets.GeneratorBasedBuilder):
|
|
142 |
datasets.SplitGenerator(
|
143 |
name=split_names.get(split),
|
144 |
gen_kwargs={
|
145 |
-
"
|
146 |
-
"
|
147 |
"meta_paths": meta_paths[split],
|
148 |
},
|
149 |
),
|
@@ -153,8 +153,8 @@ class Rixvox(datasets.GeneratorBasedBuilder):
|
|
153 |
datasets.SplitGenerator(
|
154 |
name=split_names.get(self.config.name),
|
155 |
gen_kwargs={
|
156 |
-
"
|
157 |
-
"
|
158 |
"meta_paths": meta_paths[self.config.name],
|
159 |
},
|
160 |
),
|
@@ -165,7 +165,7 @@ class Rixvox(datasets.GeneratorBasedBuilder):
|
|
165 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
166 |
def _generate_examples(
|
167 |
self,
|
168 |
-
|
169 |
archive_iters,
|
170 |
meta_paths,
|
171 |
):
|
@@ -188,11 +188,11 @@ class Rixvox(datasets.GeneratorBasedBuilder):
|
|
188 |
|
189 |
result = dict(df_meta.loc[filename])
|
190 |
path = (
|
191 |
-
os.path.join(
|
192 |
-
if
|
193 |
else filename
|
194 |
)
|
195 |
result["audio"] = {"path": path, "bytes": file.read()}
|
196 |
-
result["path"] = path if
|
197 |
|
198 |
yield path, result
|
|
|
142 |
datasets.SplitGenerator(
|
143 |
name=split_names.get(split),
|
144 |
gen_kwargs={
|
145 |
+
"local_extracted_archive_paths": local_extracted_archives.get(split),
|
146 |
+
"archive": [dl_manager.iter_archive(path) for path in archive_paths.get(split)],
|
147 |
"meta_paths": meta_paths[split],
|
148 |
},
|
149 |
),
|
|
|
153 |
datasets.SplitGenerator(
|
154 |
name=split_names.get(self.config.name),
|
155 |
gen_kwargs={
|
156 |
+
"local_extracted_archive_paths": local_extracted_archives.get(self.config.name),
|
157 |
+
"archive": [dl_manager.iter_archive(path) for path in archive_paths.get(self.config.name)],
|
158 |
"meta_paths": meta_paths[self.config.name],
|
159 |
},
|
160 |
),
|
|
|
165 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
166 |
def _generate_examples(
|
167 |
self,
|
168 |
+
local_extracted_archive_paths,
|
169 |
archive_iters,
|
170 |
meta_paths,
|
171 |
):
|
|
|
188 |
|
189 |
result = dict(df_meta.loc[filename])
|
190 |
path = (
|
191 |
+
os.path.join(local_extracted_archive_paths[i], filename)
|
192 |
+
if local_extracted_archive_paths is not None
|
193 |
else filename
|
194 |
)
|
195 |
result["audio"] = {"path": path, "bytes": file.read()}
|
196 |
+
result["path"] = path if local_extracted_archive_paths else filename
|
197 |
|
198 |
yield path, result
|