holylovenia commited on
Commit
648b463
1 Parent(s): 1984796

Upload indspeech_news_lvcsr.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. indspeech_news_lvcsr.py +12 -12
indspeech_news_lvcsr.py CHANGED
@@ -20,9 +20,9 @@ from typing import Dict, List, Tuple
20
 
21
  import datasets
22
 
23
- from nusacrowd.utils import schemas
24
- from nusacrowd.utils.configs import NusantaraConfig
25
- from nusacrowd.utils.constants import (DEFAULT_NUSANTARA_VIEW_NAME,
26
  DEFAULT_SOURCE_VIEW_NAME, Tasks)
27
 
28
  _CITATION = """\
@@ -88,28 +88,28 @@ _URLS = {
88
  _SUPPORTED_TASKS = [Tasks.SPEECH_RECOGNITION]
89
 
90
  _SOURCE_VERSION = "1.0.0"
91
- _NUSANTARA_VERSION = "1.0.0"
92
 
93
 
94
  class IndSpeechNewsLVCSR(datasets.GeneratorBasedBuilder):
95
  """Indonesian automatic speech recognition with several local accents reading short news sentences"""
96
 
97
  SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
98
- NUSANTARA_VERSION = datasets.Version(_NUSANTARA_VERSION)
99
 
100
  BUILDER_CONFIGS = [
101
- NusantaraConfig(
102
  name="indspeech_news_lvcsr_source",
103
  version=SOURCE_VERSION,
104
  description="indspeech_news_lvcsr source schema",
105
  schema="source",
106
  subset_id="indspeech_news_lvcsr",
107
  ),
108
- NusantaraConfig(
109
- name="indspeech_news_lvcsr_nusantara_sptext",
110
- version=NUSANTARA_VERSION,
111
  description="indspeech_news_lvcsr Nusantara schema",
112
- schema="nusantara_sptext",
113
  subset_id="indspeech_news_lvcsr",
114
  ),
115
  ]
@@ -129,7 +129,7 @@ class IndSpeechNewsLVCSR(datasets.GeneratorBasedBuilder):
129
  "text": datasets.Value("string"),
130
  }
131
  )
132
- elif self.config.schema == "nusantara_sptext":
133
  features = schemas.speech_text_features
134
 
135
  return datasets.DatasetInfo(
@@ -197,7 +197,7 @@ class IndSpeechNewsLVCSR(datasets.GeneratorBasedBuilder):
197
  }
198
  yield key, row
199
 
200
- elif self.config.schema == "nusantara_sptext":
201
  row = {
202
  "id": aud_id,
203
  "path": aud_file,
 
20
 
21
  import datasets
22
 
23
+ from seacrowd.utils import schemas
24
+ from seacrowd.utils.configs import SEACrowdConfig
25
+ from seacrowd.utils.constants import (DEFAULT_SEACROWD_VIEW_NAME,
26
  DEFAULT_SOURCE_VIEW_NAME, Tasks)
27
 
28
  _CITATION = """\
 
88
  _SUPPORTED_TASKS = [Tasks.SPEECH_RECOGNITION]
89
 
90
  _SOURCE_VERSION = "1.0.0"
91
+ _SEACROWD_VERSION = "2024.06.20"
92
 
93
 
94
  class IndSpeechNewsLVCSR(datasets.GeneratorBasedBuilder):
95
  """Indonesian automatic speech recognition with several local accents reading short news sentences"""
96
 
97
  SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
98
+ SEACROWD_VERSION = datasets.Version(_SEACROWD_VERSION)
99
 
100
  BUILDER_CONFIGS = [
101
+ SEACrowdConfig(
102
  name="indspeech_news_lvcsr_source",
103
  version=SOURCE_VERSION,
104
  description="indspeech_news_lvcsr source schema",
105
  schema="source",
106
  subset_id="indspeech_news_lvcsr",
107
  ),
108
+ SEACrowdConfig(
109
+ name="indspeech_news_lvcsr_seacrowd_sptext",
110
+ version=SEACROWD_VERSION,
111
  description="indspeech_news_lvcsr Nusantara schema",
112
+ schema="seacrowd_sptext",
113
  subset_id="indspeech_news_lvcsr",
114
  ),
115
  ]
 
129
  "text": datasets.Value("string"),
130
  }
131
  )
132
+ elif self.config.schema == "seacrowd_sptext":
133
  features = schemas.speech_text_features
134
 
135
  return datasets.DatasetInfo(
 
197
  }
198
  yield key, row
199
 
200
+ elif self.config.schema == "seacrowd_sptext":
201
  row = {
202
  "id": aud_id,
203
  "path": aud_file,