holylovenia
commited on
Upload indspeech_digit_cdsr.py with huggingface_hub
Browse files- indspeech_digit_cdsr.py +12 -12
indspeech_digit_cdsr.py
CHANGED
@@ -21,9 +21,9 @@ from typing import Dict, List, Tuple
|
|
21 |
|
22 |
import datasets
|
23 |
|
24 |
-
from
|
25 |
-
from
|
26 |
-
from
|
27 |
|
28 |
_CITATION = """\
|
29 |
@inproceedings{sakti-icslp-2004,
|
@@ -64,28 +64,28 @@ _URLS = {
|
|
64 |
|
65 |
_SUPPORTED_TASKS = [Tasks.SPEECH_RECOGNITION]
|
66 |
_SOURCE_VERSION = "1.0.0"
|
67 |
-
|
68 |
|
69 |
|
70 |
class INDspeechDIGITCDSR(datasets.GeneratorBasedBuilder):
|
71 |
"""Indonesian speech dataset for connected digit speech recognition"""
|
72 |
|
73 |
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
|
74 |
-
|
75 |
|
76 |
BUILDER_CONFIGS = [
|
77 |
-
|
78 |
name="indspeech_digit_cdsr_source",
|
79 |
version=SOURCE_VERSION,
|
80 |
description="indspeech_digit_cdsr source schema",
|
81 |
schema="source",
|
82 |
subset_id="indspeech_digit_cdsr",
|
83 |
),
|
84 |
-
|
85 |
-
name="
|
86 |
-
version=
|
87 |
description="indspeech_digit_cdsr Nusantara schema",
|
88 |
-
schema="
|
89 |
subset_id="indspeech_digit_cdsr",
|
90 |
),
|
91 |
]
|
@@ -105,7 +105,7 @@ class INDspeechDIGITCDSR(datasets.GeneratorBasedBuilder):
|
|
105 |
"text": datasets.Value("string"),
|
106 |
}
|
107 |
)
|
108 |
-
elif self.config.schema == "
|
109 |
features = schemas.speech_text_features
|
110 |
|
111 |
return datasets.DatasetInfo(
|
@@ -216,7 +216,7 @@ class INDspeechDIGITCDSR(datasets.GeneratorBasedBuilder):
|
|
216 |
"text": self.text_process(filepath["text"][example]),
|
217 |
}
|
218 |
|
219 |
-
elif self.config.schema == "
|
220 |
yield key, {
|
221 |
"id": example,
|
222 |
"speaker_id": spk_id,
|
|
|
21 |
|
22 |
import datasets
|
23 |
|
24 |
+
from seacrowd.utils import schemas
|
25 |
+
from seacrowd.utils.configs import SEACrowdConfig
|
26 |
+
from seacrowd.utils.constants import Tasks
|
27 |
|
28 |
_CITATION = """\
|
29 |
@inproceedings{sakti-icslp-2004,
|
|
|
64 |
|
65 |
_SUPPORTED_TASKS = [Tasks.SPEECH_RECOGNITION]
|
66 |
_SOURCE_VERSION = "1.0.0"
|
67 |
+
_SEACROWD_VERSION = "2024.06.20"
|
68 |
|
69 |
|
70 |
class INDspeechDIGITCDSR(datasets.GeneratorBasedBuilder):
|
71 |
"""Indonesian speech dataset for connected digit speech recognition"""
|
72 |
|
73 |
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
|
74 |
+
SEACROWD_VERSION = datasets.Version(_SEACROWD_VERSION)
|
75 |
|
76 |
BUILDER_CONFIGS = [
|
77 |
+
SEACrowdConfig(
|
78 |
name="indspeech_digit_cdsr_source",
|
79 |
version=SOURCE_VERSION,
|
80 |
description="indspeech_digit_cdsr source schema",
|
81 |
schema="source",
|
82 |
subset_id="indspeech_digit_cdsr",
|
83 |
),
|
84 |
+
SEACrowdConfig(
|
85 |
+
name="indspeech_digit_cdsr_seacrowd_sptext",
|
86 |
+
version=SEACROWD_VERSION,
|
87 |
description="indspeech_digit_cdsr Nusantara schema",
|
88 |
+
schema="seacrowd_sptext",
|
89 |
subset_id="indspeech_digit_cdsr",
|
90 |
),
|
91 |
]
|
|
|
105 |
"text": datasets.Value("string"),
|
106 |
}
|
107 |
)
|
108 |
+
elif self.config.schema == "seacrowd_sptext":
|
109 |
features = schemas.speech_text_features
|
110 |
|
111 |
return datasets.DatasetInfo(
|
|
|
216 |
"text": self.text_process(filepath["text"][example]),
|
217 |
}
|
218 |
|
219 |
+
elif self.config.schema == "seacrowd_sptext":
|
220 |
yield key, {
|
221 |
"id": example,
|
222 |
"speaker_id": spk_id,
|