noflm
commited on
Commit
·
ee549b9
1
Parent(s):
a7464f1
fix datasets config line:160, 165
Browse files- EliteVoiceProject.py +2 -2
EliteVoiceProject.py
CHANGED
|
@@ -155,13 +155,13 @@ class EliteVoiceProject(datasets.GeneratorBasedBuilder):
|
|
| 155 |
|
| 156 |
for i, audio_archive in enumerate(archives):
|
| 157 |
for filename, file in audio_archive:
|
| 158 |
-
|
| 159 |
if filename in metadata:
|
| 160 |
result = dict(metadata[filename])
|
| 161 |
# set the audio feature and the path to the extracted file
|
| 162 |
path = os.path.join(local_extracted_archive_paths[i], filename) if local_extracted_archive_paths else filename
|
| 163 |
result["audio"] = {"path": path, "bytes": file.read()}
|
| 164 |
# set path to None if the audio file doesn't exist locally (i.e. in streaming mode)
|
| 165 |
-
result["path"] = path if local_extracted_archive_paths else filename
|
| 166 |
|
| 167 |
yield path, result
|
|
|
|
| 155 |
|
| 156 |
for i, audio_archive in enumerate(archives):
|
| 157 |
for filename, file in audio_archive:
|
| 158 |
+
_, filename = os.path.split(filename)
|
| 159 |
if filename in metadata:
|
| 160 |
result = dict(metadata[filename])
|
| 161 |
# set the audio feature and the path to the extracted file
|
| 162 |
path = os.path.join(local_extracted_archive_paths[i], filename) if local_extracted_archive_paths else filename
|
| 163 |
result["audio"] = {"path": path, "bytes": file.read()}
|
| 164 |
# set path to None if the audio file doesn't exist locally (i.e. in streaming mode)
|
| 165 |
+
#result["path"] = path if local_extracted_archive_paths else filename
|
| 166 |
|
| 167 |
yield path, result
|