bjelkenhed commited on
Commit
f693a1b
1 Parent(s): 78b142c

prefetch removed

Browse files
Files changed (1) hide show
  1. babelbox_voice.py +1 -3
babelbox_voice.py CHANGED
@@ -7,7 +7,6 @@ import datasets
7
  from typing import List
8
  from pathlib import Path
9
  from tqdm import tqdm
10
- from prefetch_generator import background
11
  logger = datasets.logging.get_logger(__name__)
12
 
13
  _CITATION = """\
@@ -144,7 +143,6 @@ class BabelboxVoice(datasets.GeneratorBasedBuilder):
144
  })
145
  ]
146
 
147
- @background(max_prefetch=2000)
148
  def _generate_examples(self, local_extracted_archive_paths, archives, metadata):
149
 
150
  sampling_rate = 16000
@@ -164,7 +162,7 @@ class BabelboxVoice(datasets.GeneratorBasedBuilder):
164
 
165
  result = {
166
  'path' : path,
167
- 'audio' : {"path": path, "bytes": file.read() },
168
  'sentence' : metadata_item['sentence'],
169
  'speaker_id' : metadata_item['speaker_id'],
170
  'sex' : metadata_item['sex'],
 
7
  from typing import List
8
  from pathlib import Path
9
  from tqdm import tqdm
 
10
  logger = datasets.logging.get_logger(__name__)
11
 
12
  _CITATION = """\
 
143
  })
144
  ]
145
 
 
146
  def _generate_examples(self, local_extracted_archive_paths, archives, metadata):
147
 
148
  sampling_rate = 16000
 
162
 
163
  result = {
164
  'path' : path,
165
+ 'audio' : {"path": path, "bytes": file.read(), "sampling_rate": sampling_rate },
166
  'sentence' : metadata_item['sentence'],
167
  'speaker_id' : metadata_item['speaker_id'],
168
  'sex' : metadata_item['sex'],