diff --git a/README.md b/README.md index 67218f8..db73427 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,19 @@ + +> [!NOTE] +> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。 +> [English](./README.en.md) · [原始项目](https://github.com/facebookresearch/audiocraft) · [上游 README](https://github.com/facebookresearch/audiocraft/blob/HEAD/README.md) +> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。 + # AudioCraft ![docs badge](https://github.com/facebookresearch/audiocraft/workflows/audiocraft_docs/badge.svg) ![linter badge](https://github.com/facebookresearch/audiocraft/workflows/audiocraft_linter/badge.svg) ![tests badge](https://github.com/facebookresearch/audiocraft/workflows/audiocraft_tests/badge.svg) -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. +AudioCraft 是一个用于音频生成深度学习研究的 PyTorch 库。AudioCraft 包含用于两个最先进(state-of-the-art)AI 生成模型的高质量音频推理和训练代码:AudioGen 和 MusicGen。 -## Installation -AudioCraft requires Python 3.9, PyTorch 2.1.0. To install AudioCraft, you can run the following: +## 安装 +AudioCraft 需要 Python 3.9 和 PyTorch 2.1.0。要安装 AudioCraft,可以运行以下命令: ```shell # Best to make sure you have torch installed first, in particular before installing xformers. @@ -23,62 +28,61 @@ python -m pip install -e . # or if you cloned the repo locally (mandatory if yo 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: +我们还建议安装 `ffmpeg`,可通过系统或 Anaconda 安装: ```bash 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: -* [MusicGen](./docs/MUSICGEN.md): A state-of-the-art controllable text-to-music model. -* [AudioGen](./docs/AUDIOGEN.md): A state-of-the-art text-to-sound model. -* [EnCodec](./docs/ENCODEC.md): A state-of-the-art high fidelity neural audio codec. -* [Multi Band Diffusion](./docs/MBD.md): An EnCodec compatible decoder using diffusion. -* [MAGNeT](./docs/MAGNET.md): A state-of-the-art non-autoregressive model for text-to-music and text-to-sound. -* [AudioSeal](./docs/WATERMARKING.md): A state-of-the-art audio watermarking. -* [MusicGen Style](./docs/MUSICGEN_STYLE.md): A state-of-the-art text-and-style-to-music model. -* [JASCO](./docs/JASCO.md): "High quality text-to-music model conditioned on chords, melodies and drum tracks" +目前,AudioCraft 包含以下模型的训练代码和推理代码: +* [MusicGen](./docs/MUSICGEN.md):最先进的可控文本到音乐(text-to-music)模型。 +* [AudioGen](./docs/AUDIOGEN.md):最先进的文本到音效(text-to-sound)模型。 +* [EnCodec](./docs/ENCODEC.md):最先进的高保真神经音频编解码器。 +* [Multi Band Diffusion](./docs/MBD.md):使用扩散(diffusion)的、与 EnCodec 兼容的解码器。 +* [MAGNeT](./docs/MAGNET.md):用于文本到音乐和文本到音效的最先进非自回归(non-autoregressive)模型。 +* [AudioSeal](./docs/WATERMARKING.md):最先进的音频水印(audio watermarking)。 +* [MusicGen Style](./docs/MUSICGEN_STYLE.md):最先进的文本与风格到音乐(text-and-style-to-music)模型。 +* [JASCO](./docs/JASCO.md):"基于和弦、旋律和鼓轨条件的高质量文本到音乐模型" -## 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](./docs/TRAINING.md). +AudioCraft 包含用于音频深度学习研究的 PyTorch 组件,以及已开发模型的训练流水线。 +有关 AudioCraft 设计原则的一般介绍以及开发自定义训练流水线的说明,请参阅 +[AudioCraft 训练文档](./docs/TRAINING.md)。 -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 +## API 文档 -We provide some [API documentation](https://facebookresearch.github.io/audiocraft/api_docs/audiocraft/index.html) for AudioCraft. +我们为 AudioCraft 提供了部分 [API 文档](https://facebookresearch.github.io/audiocraft/api_docs/audiocraft/index.html)。 -## FAQ +## 常见问题 -#### Is the training code available? +#### 训练代码是否可用? -Yes! We provide the training code for [EnCodec](./docs/ENCODEC.md), [MusicGen](./docs/MUSICGEN.md),[Multi Band Diffusion](./docs/MBD.md) and [JASCO](./docs/JASCO.md). +是的!我们提供了 [EnCodec](./docs/ENCODEC.md)、[MusicGen](./docs/MUSICGEN.md)、[Multi Band Diffusion](./docs/MBD.md) 和 [JASCO](./docs/JASCO.md) 的训练代码。 -#### 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](https://huggingface.co/docs/transformers/installation#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](https://pytorch.org/docs/stable/hub.html#where-are-my-downloaded-models-saved). +Hugging Face 将模型存储在特定位置,可通过为 AudioCraft 模型设置 `AUDIOCRAFT_CACHE_DIR` 环境变量来覆盖该位置。 +若要更改其他 Hugging Face 模型的缓存位置,请参阅 [Hugging Face Transformers 缓存设置文档](https://huggingface.co/docs/transformers/installation#cache-setup). +最后,如果你使用的模型依赖 Demucs(例如 `musicgen-melody`),并希望更改 Demucs 的下载位置,请参阅 [Torch Hub 文档](https://pytorch.org/docs/stable/hub.html#where-are-my-downloaded-models-saved). -## License -* The code in this repository is released under the MIT license as found in the [LICENSE file](LICENSE). -* The models weights in this repository are released under the CC-BY-NC 4.0 license as found in the [LICENSE_weights file](LICENSE_weights). +## 许可证 +* 本仓库中的代码根据 [LICENSE 文件](LICENSE) 中所载的 MIT 许可证发布。 +* 本仓库中的模型权重根据 [LICENSE_weights 文件](LICENSE_weights) 中所载的 CC-BY-NC 4.0 许可证发布。 -## Citation +## 引用 -For the general framework of AudioCraft, please cite the following. +若引用 AudioCraft 的一般框架,请引用以下内容。 ``` @inproceedings{copet2023simple, title={Simple and Controllable Music Generation}, @@ -88,5 +92,5 @@ For the general framework of AudioCraft, please cite the following. } ``` -When referring to a specific model, please cite as mentioned in the model specific README, e.g -[./docs/MUSICGEN.md](./docs/MUSICGEN.md), [./docs/AUDIOGEN.md](./docs/AUDIOGEN.md), etc. +引用特定模型时,请按各模型专属 README 中的说明进行引用,例如 +[./docs/MUSICGEN.md](./docs/MUSICGEN.md)、[./docs/AUDIOGEN.md](./docs/AUDIOGEN.md) 等。