soeren commited on
Commit
c276b7f
·
1 Parent(s): fb12e65

build functons

Browse files
Files changed (1) hide show
  1. speech_commands_enriched.py +18 -19
speech_commands_enriched.py CHANGED
@@ -52,7 +52,6 @@ Version 0.01 of the data set (configuration `"v0.01"`) was released on August 3r
52
  In version 0.01 thirty different words were recoded: "Yes", "No", "Up", "Down", "Left",
53
  "Right", "On", "Off", "Stop", "Go", "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine",
54
  "Bed", "Bird", "Cat", "Dog", "Happy", "House", "Marvin", "Sheila", "Tree", "Wow".
55
- This version is not yet supported.
56
 
57
 
58
  In version 0.02 more words were added: "Backward", "Forward", "Follow", "Learn", "Visual".
@@ -61,6 +60,7 @@ In both versions, ten of them are used as commands by convention: "Yes", "No", "
61
  "Right", "On", "Off", "Stop", "Go". Other words are considered to be auxiliary (in current implementation
62
  it is marked by `True` value of `"is_unknown"` feature). Their function is to teach a model to distinguish core words
63
  from unrecognized ones.
 
64
 
65
  The `_silence_` class contains a set of longer audio clips that are either recordings or
66
  a mathematical simulation of noise.
@@ -132,28 +132,28 @@ class SpeechCommandsConfig(datasets.BuilderConfig):
132
 
133
  class SpeechCommands(datasets.GeneratorBasedBuilder):
134
  BUILDER_CONFIGS = [
135
- #SpeechCommandsConfig(
136
- # name="v0.01",
137
- # description=textwrap.dedent(
138
- # """\
139
- # Version 0.01 of the SpeechCommands dataset. Contains 30 words
140
- # (20 of them are auxiliary) and background noise.
141
- # """
142
- # ),
143
- # labels=LABELS_V1,
144
- # version=datasets.Version("0.1.0"),
145
- #),
146
  SpeechCommandsConfig(
147
- name="v0.02",
148
  description=textwrap.dedent(
149
  """\
150
- Version 0.02 of the SpeechCommands dataset.
151
- Contains 35 words (25 of them are auxiliary) and background noise.
152
  """
153
  ),
154
- labels=LABELS_V2,
155
- version=datasets.Version("0.2.0"),
156
  ),
 
 
 
 
 
 
 
 
 
 
 
157
  ]
158
 
159
  def _info(self):
@@ -267,6 +267,5 @@ class SpeechCommands(datasets.GeneratorBasedBuilder):
267
 
268
  #for debugging, comment out after
269
  if __name__ == "__main__":
270
- datasets.builder.has_sufficient_disk_space = lambda needed_bytes, directory='.': True
271
- ds = datasets.load_dataset("speech_commands_enriched.py", 'v0.02', split="train",
272
  streaming=False)
 
52
  In version 0.01 thirty different words were recoded: "Yes", "No", "Up", "Down", "Left",
53
  "Right", "On", "Off", "Stop", "Go", "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine",
54
  "Bed", "Bird", "Cat", "Dog", "Happy", "House", "Marvin", "Sheila", "Tree", "Wow".
 
55
 
56
 
57
  In version 0.02 more words were added: "Backward", "Forward", "Follow", "Learn", "Visual".
 
60
  "Right", "On", "Off", "Stop", "Go". Other words are considered to be auxiliary (in current implementation
61
  it is marked by `True` value of `"is_unknown"` feature). Their function is to teach a model to distinguish core words
62
  from unrecognized ones.
63
+ This version is not yet supported.
64
 
65
  The `_silence_` class contains a set of longer audio clips that are either recordings or
66
  a mathematical simulation of noise.
 
132
 
133
  class SpeechCommands(datasets.GeneratorBasedBuilder):
134
  BUILDER_CONFIGS = [
 
 
 
 
 
 
 
 
 
 
 
135
  SpeechCommandsConfig(
136
+ name="v0.01",
137
  description=textwrap.dedent(
138
  """\
139
+ Version 0.01 of the SpeechCommands dataset. Contains 30 words
140
+ (20 of them are auxiliary) and background noise.
141
  """
142
  ),
143
+ labels=LABELS_V1,
144
+ version=datasets.Version("0.1.0"),
145
  ),
146
+ #SpeechCommandsConfig(
147
+ # name="v0.02",
148
+ # description=textwrap.dedent(
149
+ # """\
150
+ # Version 0.02 of the SpeechCommands dataset.
151
+ # Contains 35 words (25 of them are auxiliary) and background noise.
152
+ # """
153
+ # ),
154
+ # labels=LABELS_V2,
155
+ # version=datasets.Version("0.2.0"),
156
+ #),
157
  ]
158
 
159
  def _info(self):
 
267
 
268
  #for debugging, comment out after
269
  if __name__ == "__main__":
270
+ ds = datasets.load_dataset("speech_commands_enriched.py", 'v0.01', split="test",
 
271
  streaming=False)