Skip to main content

AudioCaps Download

DISCLAIMER: This repository is a modified version of the AudioSet Download repository.

This repository contains code for downloading the AudioCaps dataset. The repository is not officially affiliated with the AudioCaps dataset.

Requirements

  • Python 3.9 (it may work with other versions, but it has not been tested)

Installation

# Install ffmpeg
sudo apt install ffmpeg
# Install audiocaps-download
pip install audiocaps-download

Usage

The following code snippet downloads the complete dataset in WAV format, and stores it in the test directory.

from audiocaps_download import Downloader
d = Downloader(root_path='audiocaps/', n_jobs=16)
d.download(format = 'wav') # it will cross-check the files with the csv files in the original repository

Download updated Dec 2023

As of December 2023, the repository has been used to download the dataset in WAV format. The following table shows the number of files downloaded.

Difference between the original training set and the updated one: 4651 Difference between the original validation set and the updated one: 255 Difference between the original test set and the updated one: 460 Training set: 45187 Validation set: 2220 Test set: 4415

Split Number of files (using this repo) Number of files (original)
Training 45187 49838
Validation 2220 2475
Test 4415 4875

The missing files may be due to the missing youtube videos, please open an issue here if you find any bug.

Implementation

The main class is audiocaps_download.Downloader. It is initialized using the following parameters:

  • root_path: the path to the directory where the dataset will be downloaded.
  • n_jobs: the number of parallel downloads. Default is 1.

The methods of the class are:

  • download(format='vorbis', quality=5): downloads the dataset.
  • The format can be one of the following (supported by yt-dlp --audio-format parameter):
    • vorbis: downloads the dataset in Ogg Vorbis format. This is the default.
    • wav: downloads the dataset in WAV format.
    • mp3: downloads the dataset in MP3 format.
    • m4a: downloads the dataset in M4A format.
    • flac: downloads the dataset in FLAC format.
    • opus: downloads the dataset in Opus format.
    • webm: downloads the dataset in WebM format.
    • ... and many more.
    • The quality can be an integer between 0 and 10. Default is 5.
  • load_dataset(): reads the csv files from the original repository. It is not used externally.
  • download_file(...): downloads a single file. It is not used externally.

Metadata

Release files for audiocaps-download 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for audiocaps-download 1.1
File Size Uploaded Provenance
audiocaps-download-1.1.tar.gz 5.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for audiocaps-download 1.1
File Interpreter ABI Platform
audiocaps_download-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / audiocaps-download-1.1.tar.gz

Download URL audiocaps-download-1.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
81d8e22997a0eef4b226490fc990731476e73d2089fb734b6c94d5343ad1deac
BLAKE2b-256 checksum
How to use checksums
750f1d37513818c3f1891f3e6608c88ddf48e55eab0fe369bf84759c291693a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / audiocaps_download-1.1-py3-none-any.whl

Download URL audiocaps_download-1.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
004bc80032516a3931197569982f1cf6792eed1d3b714a5df0a63f4d4e078de1
BLAKE2b-256 checksum
How to use checksums
031a4a32c50c6524de6d27359dc7efca27b96f918a9402aa28f22c65644ccde7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for audiocaps-download 1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page