Files
2026-07-13 10:23:43 +00:00

103 lines
7.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- WEHUB_ZH_README -->
> [!NOTE]
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
> [English](./README.en.md) · [原始项目](https://github.com/MoonInTheRiver/DiffSinger) · [上游 README](https://github.com/MoonInTheRiver/DiffSinger/blob/HEAD/README.md)
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
# DiffSinger:基于浅层扩散机制的歌唱语音合成(Singing Voice Synthesis via Shallow Diffusion Mechanism
[![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2105.02446)
[![GitHub Stars](https://img.shields.io/github/stars/MoonInTheRiver/DiffSinger?style=social)](https://github.com/MoonInTheRiver/DiffSinger)
[![downloads](https://img.shields.io/github/downloads/MoonInTheRiver/DiffSinger/total.svg)](https://github.com/MoonInTheRiver/DiffSinger/releases)
[![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-blue?label=TTSDemo)](https://huggingface.co/spaces/NATSpeech/DiffSpeech)
[![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-blue?label=SVSDemo)](https://huggingface.co/spaces/Silentlin/DiffSinger)
本仓库是我们 AAAI-2022 [论文](https://arxiv.org/abs/2105.02446), 的官方 PyTorch 实现,其中我们提出了 DiffSinger(用于歌唱语音合成 Singing-Voice-Synthesis)和 DiffSpeech(用于文本转语音 Text-to-Speech)。
:tada: :tada: :tada: **更新**
- Sep.11, 2022:electric_plug: [DiffSinger-PN](docs/README-SVS-opencpop-pndm.md)。接入我们实验室 ICLR 2022 的插件 [PNDM](https://arxiv.org/abs/2202.09778),,可免费加速 DiffSinger。
- Jul.27, 2022:更新 [SVS](docs/README-SVS.md) 相关文档。新增简易推理 [A](docs/README-SVS-opencpop-cascade.md#4-inference-from-raw-inputs) 与 [B](docs/README-SVS-opencpop-e2e.md#4-inference-from-raw-inputs);新增运行于 [HuggingFace🤗 SVS](https://huggingface.co/spaces/Silentlin/DiffSinger). 的交互式 SVS。
- Mar.2, 2022MIDI-B-version。
- Mar.1, 2022:用于歌声美化的 [NeuralSVB](https://github.com/MoonInTheRiver/NeuralSVB), 已发布。
- Feb.13, 2022:改进版代码框架 [NATSpeech](https://github.com/NATSpeech/NATSpeech), 已发布,其中包含 DiffSpeech 以及我们 NeurIPS-2021 工作 [PortaSpeech](https://openreview.net/forum?id=xmJsuh8xlq) 的实现。
- Jan.29, 2022:支持 MIDI-A-version SVS。
- Jan.13, 2022:支持 SVS,发布 PopCS 数据集。
- Dec.19, 2021:支持 TTS。[HuggingFace🤗 TTS](https://huggingface.co/spaces/NATSpeech/DiffSpeech)
:rocket: **新闻**
- Feb.24, 2022:我们的新工作 NeuralSVB 被 ACL-2022 接收 [![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2202.13277). [演示页面](https://neuralsvb.github.io).
- Dec.01, 2021DiffSinger 被 AAAI-2022 接收。
- Sep.29, 2021:我们近期工作 `PortaSpeech: Portable and High-Quality Generative Text-to-Speech` 被 NeurIPS-2021 接收 [![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2109.15166) 。
- May.06, 2021:我们将 DiffSinger 提交至 Arxiv [![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2105.02446).
## 环境
1. 若你想使用 anaconda 环境:
```sh
conda create -n your_env_name python=3.8
source activate your_env_name
pip install -r requirements_2080.txt (GPU 2080Ti, CUDA 10.2)
or pip install -r requirements_3090.txt (GPU 3090, CUDA 11.4)
```
2. 或者,若你想使用 python 的 virtual env
```sh
## 请先安装 Python 3.8。
python -m venv venv
source venv/bin/activate
# 安装依赖。
pip install -U pip
pip install Cython numpy==1.19.1
pip install torch==1.9.0
pip install -r requirements.txt
```
## 文档
- [运行 DiffSpeechTTS 版本)](docs/README-TTS.md)。
- [运行 DiffSingerSVS 版本)](docs/README-SVS.md)。
## 概览
| Mel 流水线 | 数据集 | 音高输入 | F0 预测 | 加速方法 | 声码器 |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------| ----------------- | ------------- | --------------------------- | ----------------------------- |
| [DiffSpeech (Text->F0, Text+F0->Mel, Mel->Wav)](docs/README-TTS.md) | [Ljspeech](https://keithito.com/LJ-Speech-Dataset/) | None | Explicit | Shallow Diffusion | HiFiGAN |
| [DiffSinger (Lyric+F0->Mel, Mel->Wav)](docs/README-SVS-popcs.md) | [PopCS](https://github.com/MoonInTheRiver/DiffSinger) | Ground-Truth F0 | None | Shallow Diffusion | NSF-HiFiGAN |
| [DiffSinger (Lyric+MIDI->F0, Lyric+F0->Mel, Mel->Wav)](docs/README-SVS-opencpop-cascade.md) | [OpenCpop](https://wenet.org.cn/opencpop/) | MIDI | Explicit | Shallow Diffusion | NSF-HiFiGAN |
| [FFT-Singer (Lyric+MIDI->F0, Lyric+F0->Mel, Mel->Wav)](docs/README-SVS-opencpop-cascade.md) | [OpenCpop](https://wenet.org.cn/opencpop/) | MIDI | Explicit | Invalid | NSF-HiFiGAN |
| [DiffSinger (Lyric+MIDI->Mel, Mel->Wav)](docs/README-SVS-opencpop-e2e.md) | [OpenCpop](https://wenet.org.cn/opencpop/) | MIDI | Implicit | None | Pitch-Extractor + NSF-HiFiGAN |
| [DiffSinger+PNDM (Lyric+MIDI->Mel, Mel->Wav)](docs/README-SVS-opencpop-pndm.md) | [OpenCpop](https://wenet.org.cn/opencpop/) | MIDI | Implicit | PLMS | Pitch-Extractor + NSF-HiFiGAN |
| [DiffSpeech+PNDM (Text->Mel, Mel->Wav)](docs/README-TTS-pndm.md) | [Ljspeech](https://keithito.com/LJ-Speech-Dataset/) | None | Implicit | PLMS | HiFiGAN |
## Tensorboard
```sh
tensorboard --logdir_spec exp_name
```
<table style="width:100%">
<tr>
<td><img src="resources/tfb.png" alt="Tensorboard" height="250"></td>
</tr>
</table>
## 引用
@article{liu2021diffsinger,
title={Diffsinger: Singing voice synthesis via shallow diffusion mechanism},
author={Liu, Jinglin and Li, Chengxi and Ren, Yi and Chen, Feiyang and Liu, Peng and Zhao, Zhou},
journal={arXiv preprint arXiv:2105.02446},
volume={2},
year={2021}}
## 致谢
* lucidrains 的 [denoising-diffusion-pytorch](https://github.com/lucidrains/denoising-diffusion-pytorch)
* 官方 [PyTorch Lightning](https://github.com/PyTorchLightning/pytorch-lightning)
* kan-bayashi 的 [ParallelWaveGAN](https://github.com/kan-bayashi/ParallelWaveGAN)
* jik876 的 [HifiGAN](https://github.com/jik876/hifi-gan)
* 官方 [espnet](https://github.com/espnet/espnet)
* lmnt-com 的 [DiffWave](https://github.com/lmnt-com/diffwave)
* keonlee9420 的 [Implementation](https://github.com/keonlee9420/DiffSinger).
特别感谢:
* Openvpi 团队的维护:[DiffSinger](https://github.com/openvpi/DiffSinger).
* 您的再创作与分享。