[Update] Update
Browse files- custom_common_voice.py +1 -4
custom_common_voice.py
CHANGED
@@ -167,21 +167,18 @@ class CustomCommonVoice(datasets.GeneratorBasedBuilder):
|
|
167 |
data_fields.remove("audio")
|
168 |
path_idx = data_fields.index("file_path")
|
169 |
script_idx = data_fields.index("script")
|
170 |
-
duration_idx = data_fields.index("duration")
|
171 |
examples = {}
|
172 |
|
173 |
with open(tsv_files, encoding="utf-8") as f:
|
174 |
lines = f.readlines()
|
175 |
for line in lines[1:]:
|
176 |
-
field_values = line.
|
177 |
# set full path for mp3 audio file
|
178 |
audio_path = path_to_clips + "/" + field_values[path_idx]
|
179 |
script = field_values[script_idx]
|
180 |
-
duration = field_values[duration_idx]
|
181 |
examples[audio_path] = {
|
182 |
"file_path": audio_path,
|
183 |
"script": script,
|
184 |
-
"duration": duration,
|
185 |
}
|
186 |
|
187 |
inside_clips_dir = False
|
|
|
167 |
data_fields.remove("audio")
|
168 |
path_idx = data_fields.index("file_path")
|
169 |
script_idx = data_fields.index("script")
|
|
|
170 |
examples = {}
|
171 |
|
172 |
with open(tsv_files, encoding="utf-8") as f:
|
173 |
lines = f.readlines()
|
174 |
for line in lines[1:]:
|
175 |
+
field_values = line.split("\t")
|
176 |
# set full path for mp3 audio file
|
177 |
audio_path = path_to_clips + "/" + field_values[path_idx]
|
178 |
script = field_values[script_idx]
|
|
|
179 |
examples[audio_path] = {
|
180 |
"file_path": audio_path,
|
181 |
"script": script,
|
|
|
182 |
}
|
183 |
|
184 |
inside_clips_dir = False
|