Wiki source code of Audiocraft AI
Last modified by René Schmidt on 2025/03/28 12:22
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | = AudioCraft = | ||
| 2 | |||
| 3 | |||
| 4 | [[~[~[image:https://github.com/facebookresearch/audiocraft/workflows/audiocraft_docs/badge.svg~|~|alt="docs badge"~]~]>>url:https://github.com/facebookresearch/audiocraft/workflows/audiocraft_docs/badge.svg]] [[~[~[image:https://github.com/facebookresearch/audiocraft/workflows/audiocraft_linter/badge.svg~|~|alt="linter badge"~]~]>>url:https://github.com/facebookresearch/audiocraft/workflows/audiocraft_linter/badge.svg]] [[~[~[image:https://github.com/facebookresearch/audiocraft/workflows/audiocraft_tests/badge.svg~|~|alt="tests badge"~]~]>>url:https://github.com/facebookresearch/audiocraft/workflows/audiocraft_tests/badge.svg]] | ||
| 5 | |||
| 6 | AudioCraft 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. | ||
| 7 | |||
| 8 | == Installation == | ||
| 9 | |||
| 10 | |||
| 11 | AudioCraft requires Python 3.9, PyTorch 2.1.0. To install AudioCraft, you can run the following: | ||
| 12 | |||
| 13 | {{{# Best to make sure you have torch installed first, in particular before installing xformers. | ||
| 14 | # Don't run this if you already have PyTorch installed. | ||
| 15 | python -m pip install 'torch==2.1.0' | ||
| 16 | # You might need the following before trying to install the packages | ||
| 17 | python -m pip install setuptools wheel | ||
| 18 | # Then proceed to one of the following | ||
| 19 | python -m pip install -U audiocraft # stable release | ||
| 20 | python -m pip install -U git+https://git@github.com/facebookresearch/audiocraft#egg=audiocraft # bleeding edge | ||
| 21 | python -m pip install -e . # or if you cloned the repo locally (mandatory if you want to train). | ||
| 22 | python -m pip install -e '.[wm]' # if you want to train a watermarking model}}} | ||
| 23 | |||
| 24 | We also recommend having ffmpeg installed, either through your system or Anaconda: | ||
| 25 | |||
| 26 | {{{sudo apt-get install ffmpeg | ||
| 27 | # Or if you are using Anaconda or Miniconda | ||
| 28 | conda install "ffmpeg<5" -c conda-forge}}} | ||
| 29 | |||
| 30 | == Models == | ||
| 31 | |||
| 32 | |||
| 33 | At the moment, AudioCraft contains the training code and inference code for: |