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,运行 README 中 Installation 部分的 pip install 命令,并通过系统或 Anaconda 安装 ffmpeg 以处理音频。
它有可以直接使用的预训练权重吗?有。模型通过 Hugging Face 加载,首次运行某个模型时会自动下载并缓存预训练权重。
列出的每个模型都提供训练代码吗?不是。完整的训练代码只提供给 EnCodec、MusicGen、Multi Band Diffusion 和 JASCO,因此其他列出的模型只附带推理代码,这里没有完整的训练流程。
什么是 MusicGen?MusicGen 是 AudioCraft 的旗舰模型,是一个可控的文本生成音乐语言模型,也可以以旋律作为条件进行生成。
EnCodec 有什么用?EnCodec 是 AudioCraft 的神经音频编解码器和分词器,可以把原始音频压缩成词元,供生成模型使用。
AudioSeal 是做什么的?AudioSeal 是 AudioCraft 中包含的音频水印模型,用于标记和检测 AI 生成的音频。
什么是 MAGNeT?MAGNeT 是 AudioCraft 的非自回归模型,与标准的基于语言模型的模型相比,能更快地完成文本生成音乐和文本生成音效。
Size
24.4 MB
Stars
23.7K
Updated
CommitMar 13
Age
3y
Commits · 90 Days