--- configs: - config_name: 2m data_files: - split: train path: 2m/train/*.tar - config_name: 20k data_files: - split: train path: 20k/train/*.tar - split: test path: 20k/test/*.tar language: - en task_categories: - audio-classification tags: - audio size_categories: - 1M **_NOTE:_** Both the 20k (balanced) and 2m (unbalanced) versions share the same test set (eval). ```bash # For the 20k version huggingface-cli download confit/audioset-16khz-wds --include 20k/train/*.tar --repo-type=dataset --local-dir /path/to/store huggingface-cli download confit/audioset-16khz-wds --include 20k/test/*.tar --repo-type=dataset --local-dir /path/to/store # For the 2m version huggingface-cli download confit/audioset-16khz-wds --include 2m/train/*.tar --repo-type=dataset --local-dir /path/to/store huggingface-cli download confit/audioset-16khz-wds --include 2m/test/*.tar --repo-type=dataset --local-dir /path/to/store ``` > **_NOTE:_** The `--local-dir /path/to/store` argument specifies the root directory where the dataset will be stored. You do not need to manually create subdirectories (e.g., `/path/to/store/20k/train`). The command will automatically create the required folder structure. ## Format and Usage The dataset is stored in the WebDataset (WDS) format, which is optimised for distributed training and streaming. Each `.tar` archive contains audio files and corresponding metadata. To load the dataset in Python using webdataset: ```python train_base_url = '/path/to/20k/train/shard-{i:05d}.tar' train_urls = [train_base_url.format(i=i) for i in range(7)] test_base_url = '/path/to/20k/test/shard-{i:05d}.tar' test_urls = [test_base_url.format(i=i) for i in range(6)] raw_datasets = load_dataset( "webdataset", data_files={"train": train_urls, "test": test_urls}, streaming=False ) ``` Each sample in the dataset follows the WebDataset format, which includes the following fields: ```plain { '__key__': 'sample-000000000', '__url__': '/path/to/20k/train/shard-00000.tar', 'wav': { 'path': 'sample-000000000.wav', 'array': array([ 0., ..., -0.00256348]), 'sampling_rate': 16000 }, 'json': { 'id': 'YUJxAKoY0gRM', 'label': ['Clarinet'], 'label_id': [198] } } ``` ## License and Usage Restrictions Please ensure compliance with YouTube's terms of service when using this dataset. Some clips may no longer be available if the original videos have been removed or made private.