Skip to main content

This package aims at simplifying the download of the AudioCaps dataset.

Project description

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')

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audiocaps-download-1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

audiocaps_download-1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file audiocaps-download-1.0.tar.gz.

File metadata

  • Download URL: audiocaps-download-1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for audiocaps-download-1.0.tar.gz
Algorithm Hash digest
SHA256 8cb8fd0325eab6fc8c9dc771c83528ef0144ad834c11a8a577e8fbf36be7990c
MD5 6d1791043c36363944cdf860e7c5d2f5
BLAKE2b-256 7a4e24dfe3bc9bf2fc13ab375ed3f612abc9554f1e13b95204a1a2f1fd9711fb

See more details on using hashes here.

File details

Details for the file audiocaps_download-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for audiocaps_download-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5cb408a7e52ce68b4e5f3cc0bfd304bd5cd0c681c7b8aa92ed1634868bd21850
MD5 1c6d7872b38a876a40903dfcd2aca8cb
BLAKE2b-256 23e98e3948fabd1524818c2013798cdf97133975bc081d7b73c725ea3b9448f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page