Module audiocraft.data

Audio loading and writing support. Datasets for raw audio or also including some metadata.

Expand source code
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
"""Audio loading and writing support. Datasets for raw audio
or also including some metadata."""

# flake8: noqa
from . import audio, audio_dataset, info_audio_dataset, music_dataset, sound_dataset

Sub-modules

audiocraft.data.audio

Audio IO methods are defined in this module (info, read, write), We rely on av library for faster read when possible, otherwise on torchaudio.

audiocraft.data.audio_dataset

AudioDataset support. In order to handle a larger number of files without having to scan again the folders, we precompute some metadata (filename, …

audiocraft.data.audio_utils

Various utilities for audio convertion (pcm format, sample rate and channels), and volume normalization.

audiocraft.data.info_audio_dataset

Base classes for the datasets that also provide non-audio metadata, e.g. description, text transcription etc.

audiocraft.data.music_dataset

Dataset of music tracks with rich metadata.

audiocraft.data.sound_dataset

Dataset of audio with a simple description.

audiocraft.data.zip

Utility for reading some info from inside a zip file.