AymanElmar commited on
Commit ·
ce89bc8
1
Parent(s): 9271a2f
targz
Browse files
joha.py
CHANGED
|
@@ -137,8 +137,12 @@ class johaDataset(datasets.GeneratorBasedBuilder):
|
|
| 137 |
audio_path = "/".join([path_to_clips,field_values[path_idx]])
|
| 138 |
all_field_values[audio_path] = field_values
|
| 139 |
# Else, read the audio file and yield an example
|
| 140 |
-
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
if not all_field_values:
|
| 143 |
break
|
| 144 |
if path in all_field_values:
|
|
|
|
| 137 |
audio_path = "/".join([path_to_clips,field_values[path_idx]])
|
| 138 |
all_field_values[audio_path] = field_values
|
| 139 |
# Else, read the audio file and yield an example
|
| 140 |
+
for path, f in archive_iterator:
|
| 141 |
+
if path.startswith(path_to_clips +"/data"):
|
| 142 |
+
if not metadata_found:
|
| 143 |
+
raise FileNotFoundError(
|
| 144 |
+
"The metadata file %s was not found in the archive %s" % (metadata_filepath, archive_iterator.archive_path)
|
| 145 |
+
)
|
| 146 |
if not all_field_values:
|
| 147 |
break
|
| 148 |
if path in all_field_values:
|