Datasets:

Modalities:
Audio
Text
ArXiv:
Libraries:
Datasets
License:
polinaeterna HF staff commited on
Commit
0fd9d7c
1 Parent(s): e68cfc9

fix script

Browse files
Files changed (1) hide show
  1. voxpopuli.py +8 -3
voxpopuli.py CHANGED
@@ -64,9 +64,9 @@ class VoxpopuliConfig(datasets.BuilderConfig):
64
  """
65
  Args:
66
  name: `string` or `List[string]`:
67
- name of a config: either one of the supported languages, "multilang" for many languages.
68
  By default, "multilang" config includes all languages, including accented ones.
69
- To specify a custom set of languages, pass them to the `language` parameter
70
  languages: `List[string]`: if config is "multilang" can be either "all" for all available languages,
71
  including accented ones (default), or a custom list of languages.
72
  **kwargs: keyword arguments forwarded to super.
@@ -145,7 +145,7 @@ class Voxpopuli(datasets.GeneratorBasedBuilder):
145
  local_extracted_audio_paths = (
146
  dl_manager.extract(audio_paths) if not dl_manager.is_streaming else
147
  {
148
- split: {lang: [None] * len(audio_paths[split]) for lang in self.config.languages} for split in splits
149
  }
150
  )
151
  if self.config.name == "en_accented":
@@ -200,10 +200,15 @@ class Voxpopuli(datasets.GeneratorBasedBuilder):
200
  ]
201
 
202
  def _generate_examples(self, audio_archives, local_extracted_archives_paths, metadata_paths):
 
 
 
203
  assert len(metadata_paths) == len(audio_archives) == len(local_extracted_archives_paths)
204
  features = ["raw_text", "normalized_text", "speaker_id", "gender", "is_gold_transcript", "accent"]
205
 
206
  for lang in self.config.languages:
 
 
207
  assert len(audio_archives[lang]) == len(local_extracted_archives_paths[lang])
208
 
209
  meta_path = metadata_paths[lang]
 
64
  """
65
  Args:
66
  name: `string` or `List[string]`:
67
+ name of a config: either one of the supported languages or "multilang" for many languages.
68
  By default, "multilang" config includes all languages, including accented ones.
69
+ To specify a custom set of languages, pass them to the `languages` parameter
70
  languages: `List[string]`: if config is "multilang" can be either "all" for all available languages,
71
  including accented ones (default), or a custom list of languages.
72
  **kwargs: keyword arguments forwarded to super.
 
145
  local_extracted_audio_paths = (
146
  dl_manager.extract(audio_paths) if not dl_manager.is_streaming else
147
  {
148
+ split: {lang: [None] * len(audio_paths[split][lang]) for lang in self.config.languages} for split in splits
149
  }
150
  )
151
  if self.config.name == "en_accented":
 
200
  ]
201
 
202
  def _generate_examples(self, audio_archives, local_extracted_archives_paths, metadata_paths):
203
+ # print(metadata_paths)
204
+ # print(audio_archives)
205
+ # print(local_extracted_archives_paths)
206
  assert len(metadata_paths) == len(audio_archives) == len(local_extracted_archives_paths)
207
  features = ["raw_text", "normalized_text", "speaker_id", "gender", "is_gold_transcript", "accent"]
208
 
209
  for lang in self.config.languages:
210
+ # print(audio_archives[lang])
211
+ # print(local_extracted_archives_paths[lang])
212
  assert len(audio_archives[lang]) == len(local_extracted_archives_paths[lang])
213
 
214
  meta_path = metadata_paths[lang]