holylovenia commited on
Commit
e8e0a64
1 Parent(s): 425e419

Upload indspeech_news_ethnicsr.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. indspeech_news_ethnicsr.py +11 -11
indspeech_news_ethnicsr.py CHANGED
@@ -5,9 +5,9 @@ import datasets
5
  import json
6
  import os
7
 
8
- from nusacrowd.utils import schemas
9
- from nusacrowd.utils.configs import NusantaraConfig
10
- from nusacrowd.utils.constants import Tasks
11
  from zipfile import ZipFile
12
 
13
  _CITATION = """\
@@ -39,7 +39,7 @@ _URLS = {
39
 
40
  _SUPPORTED_TASKS = [Tasks.SPEECH_RECOGNITION]
41
  _SOURCE_VERSION = "1.0.0"
42
- _NUSANTARA_VERSION = "1.0.0"
43
 
44
 
45
  class IndSpeechNewsEthnicSR(datasets.GeneratorBasedBuilder):
@@ -47,25 +47,25 @@ class IndSpeechNewsEthnicSR(datasets.GeneratorBasedBuilder):
47
 
48
 
49
  SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
50
- NUSANTARA_VERSION = datasets.Version(_NUSANTARA_VERSION)
51
 
52
  BUILDER_CONFIGS = []
53
 
54
  for fold_id in ["overlap", "nooverlap"]:
55
  for fold_name in ['jv', "su"]:
56
  BUILDER_CONFIGS.extend(
57
- [NusantaraConfig(
58
  name=f"indspeech_news_ethnicsr_{fold_name}_{fold_id}_source",
59
  version=_SOURCE_VERSION,
60
  description="indspeech_news_ethnicsr source schema",
61
  schema="source",
62
  subset_id=f"indspeech_news_ethnicsr_{fold_name}_{fold_id}"
63
  ),
64
- NusantaraConfig(
65
- name=f"indspeech_news_ethnicsr_{fold_name}_{fold_id}_nusantara_sptext",
66
  version=_SOURCE_VERSION,
67
  description="indspeech_news_ethnicsr Nusantara schema",
68
- schema="nusantara_sptext",
69
  subset_id=f"indspeech_news_ethnicsr_{fold_name}_{fold_id}"
70
  ),]
71
  )
@@ -86,7 +86,7 @@ class IndSpeechNewsEthnicSR(datasets.GeneratorBasedBuilder):
86
  }
87
  )
88
 
89
- elif self.config.schema == "nusantara_sptext":
90
  features = schemas.speech_text_features
91
 
92
  return datasets.DatasetInfo(
@@ -198,7 +198,7 @@ class IndSpeechNewsEthnicSR(datasets.GeneratorBasedBuilder):
198
  }
199
  yield audio_id, ex
200
 
201
- elif self.config.schema == "nusantara_sptext":
202
  ex = {
203
  "id": audio_id,
204
  "speaker_id": speaker_id,
 
5
  import json
6
  import os
7
 
8
+ from seacrowd.utils import schemas
9
+ from seacrowd.utils.configs import SEACrowdConfig
10
+ from seacrowd.utils.constants import Tasks
11
  from zipfile import ZipFile
12
 
13
  _CITATION = """\
 
39
 
40
  _SUPPORTED_TASKS = [Tasks.SPEECH_RECOGNITION]
41
  _SOURCE_VERSION = "1.0.0"
42
+ _SEACROWD_VERSION = "2024.06.20"
43
 
44
 
45
  class IndSpeechNewsEthnicSR(datasets.GeneratorBasedBuilder):
 
47
 
48
 
49
  SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
50
+ SEACROWD_VERSION = datasets.Version(_SEACROWD_VERSION)
51
 
52
  BUILDER_CONFIGS = []
53
 
54
  for fold_id in ["overlap", "nooverlap"]:
55
  for fold_name in ['jv', "su"]:
56
  BUILDER_CONFIGS.extend(
57
+ [SEACrowdConfig(
58
  name=f"indspeech_news_ethnicsr_{fold_name}_{fold_id}_source",
59
  version=_SOURCE_VERSION,
60
  description="indspeech_news_ethnicsr source schema",
61
  schema="source",
62
  subset_id=f"indspeech_news_ethnicsr_{fold_name}_{fold_id}"
63
  ),
64
+ SEACrowdConfig(
65
+ name=f"indspeech_news_ethnicsr_{fold_name}_{fold_id}_seacrowd_sptext",
66
  version=_SOURCE_VERSION,
67
  description="indspeech_news_ethnicsr Nusantara schema",
68
+ schema="seacrowd_sptext",
69
  subset_id=f"indspeech_news_ethnicsr_{fold_name}_{fold_id}"
70
  ),]
71
  )
 
86
  }
87
  )
88
 
89
+ elif self.config.schema == "seacrowd_sptext":
90
  features = schemas.speech_text_features
91
 
92
  return datasets.DatasetInfo(
 
198
  }
199
  yield audio_id, ex
200
 
201
+ elif self.config.schema == "seacrowd_sptext":
202
  ex = {
203
  "id": audio_id,
204
  "speaker_id": speaker_id,