Package: audiocraft
AudioCraftAudioCraft is a PyTorch library for deep learning research on audio generation. AudioCraft contains inference and training code
for two state-of-the-art AI generative models producing high-quality audio: AudioGen and MusicGen.InstallationAudioCraft requires Python 3.9, PyTorch 2.1.0. To install AudioCraft, you can run the following:# Best to make sure you have torch installed first, in particular before installing xformers.# Don't run this if you already have PyTorch installed.python-mpipinstall'torch==2.1.0'# You might need the following before trying to install the packagespython-mpipinstallsetuptoolswheel# Then proceed to one of the followingpython-mpipinstall-Uaudiocraft# stable releasepython-mpipinstall-Ugit+https://git@github.com/facebookresearch/audiocraft#egg=audiocraft# bleeding edgepython-mpipinstall-e.# or if you cloned the repo locally (mandatory if you want to train).We also recommend havingffmpeginstalled, either through your system or Anaconda:sudoapt-getinstallffmpeg# Or if you are using Anaconda or Minicondacondainstall"ffmpeg<5"-cconda-forgeModelsAt the moment, AudioCraft contains the training code and inference code for:MusicGen: A state-of-the-art controllable text-to-music model.AudioGen: A state-of-the-art text-to-sound model.EnCodec: A state-of-the-art high fidelity neural audio codec.Multi Band Diffusion: An EnCodec compatible decoder using diffusion.Training codeAudioCraft contains PyTorch components for deep learning research in audio and training pipelines for the developed models.
For a general introduction of AudioCraft design principles and instructions to develop your own training pipeline, refer to
theAudioCraft training documentation.For reproducing existing work and using the developed training pipelines, refer to the instructions for each specific model
that provides pointers to configuration, example grids and model/task-specific information and FAQ.API documentationWe provide someAPI documentationfor AudioCraft.FAQIs the training code available?Yes! We provide the training code forEnCodec,MusicGenandMulti Band Diffusion.Where are the models stored?Hugging Face stored the model in a specific location, which can be overriden by setting theAUDIOCRAFT_CACHE_DIRenvironment variable for the AudioCraft models.
In order to change the cache location of the other Hugging Face models, please check out theHugging Face Transformers documentation for the cache setup.
Finally, if you use a model that relies on Demucs (e.g.musicgen-melody) and want to change the download location for Demucs, refer to theTorch Hub documentation.LicenseThe code in this repository is released under the MIT license as found in theLICENSE file.The models weights in this repository are released under the CC-BY-NC 4.0 license as found in theLICENSE_weights file.CitationFor the general framework of AudioCraft, please cite the following.@inproceedings{copet2023simple,
    title={Simple and Controllable Music Generation},
    author={Jade Copet and Felix Kreuk and Itai Gat and Tal Remez and David Kant and Gabriel Synnaeve and Yossi Adi and Alexandre Défossez},
    booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
    year={2023},
}When referring to a specific model, please cite as mentioned in the model specific README, e.g./docs/MUSICGEN.md,./docs/AUDIOGEN.md, etc.