Datasets:

Modalities:
Audio
Text
ArXiv:
Libraries:
Datasets
License:

load_dataset() function whit split='test' is downloading all data.

#5
by SantiagoMoreno-Col - opened

When you use the load_dataset("mozilla-foundation/common_voice_13_0", "es", split="test") the function download and generates all splits in the data, not only the test set.

The best option here would be to stream the dataset and load samples on the fly:

from datasets import load_dataset
from tqdm import tqdm

dataset = load_dataset("mozilla-foundation/common_voice_13_0", "es", split="test", streaming=True)

# stream individual samples on the fly
for sample in tqdm(dataset):
    audio = sample["audio"]
    text = sample["sentence"]
    # do whatever you need to do...

You can also use a streaming dataset with a torch data loader for batched inference (see https://huggingface.co/datasets/mozilla-foundation/common_voice_13_0#streaming)

Sign up or log in to comment