polinaeterna HF staff sanchit-gandhi HF staff commited on
Commit
9f8157c
1 Parent(s): 99bede6

Fix streaming mode bug (#4)

Browse files

- Fix streaming mode bug (8f44d63dc90d74f1d8c2573c7b76100485869883)


Co-authored-by: Sanchit Gandhi <sanchit-gandhi@users.noreply.huggingface.co>

Files changed (1) hide show
  1. peoples_speech.py +1 -1
peoples_speech.py CHANGED
@@ -157,7 +157,7 @@ class PeoplesSpeech(datasets.GeneratorBasedBuilder):
157
  # In non-streaming mode, we extract the archives to have the data locally:
158
  local_extracted_archive_paths = dl_manager.extract(audio_archive_paths) \
159
  if not dl_manager.is_streaming else \
160
- {split: [None] * len(audio_archive_paths) for split in splits_to_configs}
161
 
162
  manifest_urls = {
163
  split: _MANIFEST_URL.format(split=split, config=config) for split, config in splits_to_configs.items()
157
  # In non-streaming mode, we extract the archives to have the data locally:
158
  local_extracted_archive_paths = dl_manager.extract(audio_archive_paths) \
159
  if not dl_manager.is_streaming else \
160
+ {split: [None] * len(audio_archive_paths[split]) for split in splits_to_configs}
161
 
162
  manifest_urls = {
163
  split: _MANIFEST_URL.format(split=split, config=config) for split, config in splits_to_configs.items()