jayliqinzhang commited on
Commit
1b9fccd
1 Parent(s): 05da4fa

Upload mumospee_small.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. mumospee_small.py +14 -6
mumospee_small.py CHANGED
@@ -19,21 +19,22 @@ _TAGS = ["CoVoST", "GigaSpeech", "peoples_speech", "Librispeech", "LibriTTS", "E
19
 
20
  _SPLITS = ["train", "validation", "test"]
21
 
22
- # Base URL for audio files (assuming they are stored in a consistent structure)
23
- _BASE_AUDIO_URL = "https://huggingface.co/datasets/meetween/mumospee_librispeech/blob/main/"
24
-
25
  # BuilderConfig class for your dataset
26
- class YourDatasetConfig(datasets.BuilderConfig):
27
  def __init__(self, name, *args, **kwargs):
28
  super().__init__(name=name, *args, **kwargs)
 
 
 
 
29
 
30
- class YourDataset(datasets.GeneratorBasedBuilder):
31
  """Your custom dataset for Hugging Face based on the CSV metadata and audio URLs."""
32
 
33
  VERSION = datasets.Version("1.0.0")
34
 
35
  # Define the available configurations (could be subsets like split or language)
36
- BUILDER_CONFIGS = [YourDatasetConfig(name="default")]
37
 
38
  def _info(self):
39
  # Define the features of your dataset
@@ -111,3 +112,10 @@ class YourDataset(datasets.GeneratorBasedBuilder):
111
  # This is an example function for downloading audio if it's needed
112
  # You can integrate this within your data processing pipeline if required
113
  pass
 
 
 
 
 
 
 
 
19
 
20
  _SPLITS = ["train", "validation", "test"]
21
 
 
 
 
22
  # BuilderConfig class for your dataset
23
+ class MumospeeDatasetConfig(datasets.BuilderConfig):
24
  def __init__(self, name, *args, **kwargs):
25
  super().__init__(name=name, *args, **kwargs)
26
+ self.language = kwargs.get("language", None) # Add language as a key in the config
27
+ self.tag = kwargs.get("tag", None) # Add tag as a key in the config
28
+
29
+
30
 
31
+ class MumospeeDataset(datasets.GeneratorBasedBuilder):
32
  """Your custom dataset for Hugging Face based on the CSV metadata and audio URLs."""
33
 
34
  VERSION = datasets.Version("1.0.0")
35
 
36
  # Define the available configurations (could be subsets like split or language)
37
+ BUILDER_CONFIGS = [MumospeeDatasetConfig(name="default")]
38
 
39
  def _info(self):
40
  # Define the features of your dataset
 
112
  # This is an example function for downloading audio if it's needed
113
  # You can integrate this within your data processing pipeline if required
114
  pass
115
+
116
+
117
+
118
+
119
+
120
+
121
+