audiocraft README

The project's README from github.com/facebookresearch/audiocraft. As one markdown file: README.md.

AudioCraft

docs badge linter badge tests badge

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.

Installation

AudioCraft 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 -m pip install 'torch==2.1.0'
# You might need the following before trying to install the packages
python -m pip install setuptools wheel
# Then proceed to one of the following
python -m pip install -U audiocraft  # stable release
python -m pip install -U git+https://[email protected]/facebookresearch/audiocraft#egg=audiocraft  # bleeding edge
python -m pip install -e .  # or if you cloned the repo locally (mandatory if you want to train).
python -m pip install -e '.[wm]'  # if you want to train a watermarking model

We also recommend having ffmpeg installed, either through your system or Anaconda:

sudo apt-get install ffmpeg
# Or if you are using Anaconda or Miniconda
conda install "ffmpeg<5" -c conda-forge

Models

At the moment, AudioCraft contains the training code and inference code for:

Training code

AudioCraft 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 the AudioCraft 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 documentation

We provide some API documentation for AudioCraft.

FAQ

Is the training code available?

Yes! We provide the training code for EnCodec, MusicGen,Multi Band Diffusion and JASCO.

Where are the models stored?

Hugging Face stored the model in a specific location, which can be overridden by setting the AUDIOCRAFT_CACHE_DIR environment variable for the AudioCraft models. In order to change the cache location of the other Hugging Face models, please check out the Hugging 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 the Torch Hub documentation.

License

Citation

For 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.

audiocraft (facebookresearch/audiocraft)

Searching Database…

Что это?AudioCraft — это библиотека на PyTorch для исследований в области глубокого обучения, связанных с генерацией звука. Она построена на генеративных моделях MusicGen (текст в музыку) и AudioGen (текст в звук), а также включает нейросетевой аудиокодек EnCodec.
Это готовое приложение или исследовательский код?Это исследовательская библиотека с компонентами на PyTorch, скриптами для инференса и конвейерами обучения, которые запускаются как Python-код, а не как готовое упакованное приложение.
Как установить и начать пользоваться?Установите Python 3.9 вместе с PyTorch 2.1.0, выполните команду pip install из раздела Installation в README и также установите ffmpeg (через систему или Anaconda) для работы со звуком.
Есть ли в комплекте готовые предобученные веса, которыми можно сразу пользоваться?Да: модели загружаются через Hugging Face, которая автоматически скачивает предобученные веса и сохраняет их в кэш при первом запуске модели.
Есть ли код обучения для всех перечисленных моделей?Нет: полный код обучения предоставлен только для EnCodec, MusicGen, Multi Band Diffusion и JASCO, поэтому остальные перечисленные модели поставляются только с кодом инференса, а полного конвейера обучения здесь нет.
Что такое MusicGen?MusicGen — флагманская модель AudioCraft: управляемая языковая модель для генерации музыки по тексту, которую также можно обусловить мелодией.
Для чего используется EnCodec?EnCodec — нейросетевой аудиокодек и токенизатор AudioCraft, который сжимает исходный звук в токены, с которыми работают генеративные модели.
Что делает AudioSeal?AudioSeal — модель аудиоводяных знаков, входящая в AudioCraft; она помечает и распознаёт звук, созданный ИИ.
Что такое MAGNeT?MAGNeT — неавторегрессионная модель AudioCraft для генерации музыки и звука по тексту, которая работает быстрее стандартных моделей, построенных на языковых моделях.
Size
24.4 MB
Stars
23.7K
Updated
CommitMar 13
Age
3y
Commits · 90 Days