Update builder.py
Browse files- builder.py +7 -7
builder.py
CHANGED
|
@@ -57,9 +57,9 @@ class ASR_SAM(datasets.GeneratorBasedBuilder):
|
|
| 57 |
description=_DESCRIPTION,
|
| 58 |
features=datasets.Features(
|
| 59 |
{
|
| 60 |
-
"
|
| 61 |
-
"
|
| 62 |
-
"
|
| 63 |
}
|
| 64 |
),
|
| 65 |
homepage="https://www.openslr.org/54/",
|
|
@@ -67,7 +67,7 @@ class ASR_SAM(datasets.GeneratorBasedBuilder):
|
|
| 67 |
citation=_CITATION,
|
| 68 |
task_templates=[
|
| 69 |
datasets.tasks.AutomaticSpeechRecognition(
|
| 70 |
-
audio_column="
|
| 71 |
)
|
| 72 |
],
|
| 73 |
)
|
|
@@ -92,7 +92,7 @@ class ASR_SAM(datasets.GeneratorBasedBuilder):
|
|
| 92 |
for key, row in enumerate(reader):
|
| 93 |
path = os.path.join(audio_paths, 'CLEAN_DATA', row['utterance_id'])
|
| 94 |
yield key, {
|
| 95 |
-
"
|
| 96 |
-
"
|
| 97 |
-
"
|
| 98 |
}
|
|
|
|
| 57 |
description=_DESCRIPTION,
|
| 58 |
features=datasets.Features(
|
| 59 |
{
|
| 60 |
+
"audio_id": datasets.Value("string"),
|
| 61 |
+
"AUDIO": datasets.Audio(),
|
| 62 |
+
"LABEL": datasets.Value("string"),
|
| 63 |
}
|
| 64 |
),
|
| 65 |
homepage="https://www.openslr.org/54/",
|
|
|
|
| 67 |
citation=_CITATION,
|
| 68 |
task_templates=[
|
| 69 |
datasets.tasks.AutomaticSpeechRecognition(
|
| 70 |
+
audio_column="AUDIO", transcription_column="LABEL"
|
| 71 |
)
|
| 72 |
],
|
| 73 |
)
|
|
|
|
| 92 |
for key, row in enumerate(reader):
|
| 93 |
path = os.path.join(audio_paths, 'CLEAN_DATA', row['utterance_id'])
|
| 94 |
yield key, {
|
| 95 |
+
"audio_id": row['utterance_id'],
|
| 96 |
+
"AUDIO": path,
|
| 97 |
+
"LABEL": row['transcription'],
|
| 98 |
}
|