Commit
·
68a0705
1
Parent(s):
4c18b3d
Update librispeech_asr.py
Browse files- librispeech_asr.py +2 -1
librispeech_asr.py
CHANGED
|
@@ -18,6 +18,7 @@
|
|
| 18 |
|
| 19 |
|
| 20 |
import os
|
|
|
|
| 21 |
|
| 22 |
import datasets
|
| 23 |
from datasets.tasks import AutomaticSpeechRecognition
|
|
@@ -138,7 +139,7 @@ class LibrispeechASR(datasets.GeneratorBasedBuilder):
|
|
| 138 |
audio_file = f"{id_}.flac"
|
| 139 |
speaker_id, chapter_id = [int(el) for el in id_.split("-")[:2]]
|
| 140 |
audio_file = (
|
| 141 |
-
|
| 142 |
if local_extracted_archive
|
| 143 |
else audio_file
|
| 144 |
)
|
|
|
|
| 18 |
|
| 19 |
|
| 20 |
import os
|
| 21 |
+
from pathlib import Path
|
| 22 |
|
| 23 |
import datasets
|
| 24 |
from datasets.tasks import AutomaticSpeechRecognition
|
|
|
|
| 139 |
audio_file = f"{id_}.flac"
|
| 140 |
speaker_id, chapter_id = [int(el) for el in id_.split("-")[:2]]
|
| 141 |
audio_file = (
|
| 142 |
+
str(Path(path).parent / audio_file)
|
| 143 |
if local_extracted_archive
|
| 144 |
else audio_file
|
| 145 |
)
|