README.md 14.2 KB
Newer Older
L
liuyibing01 已提交
1 2
# Parakeet

Z
zhaokexin01 已提交
3 4
Parakeet aims to provide a flexible, efficient and state-of-the-art text-to-speech toolkit for the open-source community. It is built on PaddlePaddle Fluid dynamic graph and includes many influential TTS models proposed by [Baidu Research](http://research.baidu.com) and other research groups.  

Z
zhaokexin01 已提交
5 6 7 8
<div align="center">
  <img src="images/logo.png" width=450 /> <br>
</div>

L
liuyibing01 已提交
9
In particular, it features the latest [WaveFlow](https://arxiv.org/abs/1912.01219) model proposed by Baidu Research.
10

L
liuyibing01 已提交
11
- WaveFlow can synthesize 22.05 kHz high-fidelity speech around 40x faster than real-time on a Nvidia V100 GPU without engineered inference kernels, which is faster than [WaveGlow](https://github.com/NVIDIA/waveglow) and serveral orders of magnitude faster than WaveNet.
L
liuyibing01 已提交
12
- WaveFlow is a small-footprint flow-based model for raw audio. It has only 5.9M parameters, which is 15x smalller than WaveGlow (87.9M).
13
- WaveFlow is directly trained with maximum likelihood without probability density distillation and auxiliary losses as used in Parallel WaveNet and ClariNet, which simplifies the training pipeline and reduces the cost of development.
Z
zhaokexin01 已提交
14

15 16
## Overview

Y
Yibing Liu 已提交
17
In order to facilitate exploiting the existing TTS models directly and developing the new ones, Parakeet selects typical models and provides their reference implementations in PaddlePaddle. Further more, Parakeet abstracts the TTS pipeline and standardizes the procedure of data preprocessing, common modules sharing, model configuration, and the process of training and synthesis. The models supported here include Vocoders and end-to-end TTS models:
18 19 20 21 22 23 24 25 26 27 28 29 30

- Vocoders
  - [WaveFlow: A Compact Flow-based Model for Raw Audio](https://arxiv.org/abs/1912.01219)
  - [ClariNet: Parallel Wave Generation in End-to-End Text-to-Speech](https://arxiv.org/abs/1807.07281)
  - [WaveNet: A Generative Model for Raw Audio](https://arxiv.org/abs/1609.03499)

- TTS models
  - [Deep Voice 3: Scaling Text-to-Speech with Convolutional Sequence Learning](https://arxiv.org/abs/1710.07654)
  - [Neural Speech Synthesis with Transformer Network (Transformer TTS)](https://arxiv.org/abs/1809.08895)
  - [FastSpeech: Fast, Robust and Controllable Text to Speech](https://arxiv.org/abs/1905.09263)

And more will be added in the future.

L
liuyibing01 已提交
31
See the [guide](docs/experiment_guide.md) for details about how to build your own model and experiment in Parakeet.
32 33

## Setup
L
liuyibing01 已提交
34

Z
zhaokexin01 已提交
35
Make sure the library `libsndfile1` is installed, e.g., on Ubuntu.
L
liuyibing01 已提交
36 37 38 39

```bash
sudo apt-get install libsndfile1
```
L
liuyibing01 已提交
40

L
liuyibing01 已提交
41
### Install PaddlePaddle
42

C
chenfeiyu 已提交
43
See [install](https://www.paddlepaddle.org.cn/install/quick) for more details. This repo requires PaddlePaddle **1.8.0** or above.
44 45 46

### Install Parakeet

L
liuyibing01 已提交
47
```bash
48
git clone https://github.com/PaddlePaddle/Parakeet
49 50
cd Parakeet
pip install -e .
L
liuyibing01 已提交
51 52
```

53 54 55
### Install CMUdict for nltk

CMUdict from nltk is used to transform text into phonemes.
56

57 58
```python
import nltk
59
nltk.download("punkt")
60 61
nltk.download("cmudict")
```
62

63 64
## Examples

65 66 67 68 69 70 71 72 73 74 75 76
Entries to the introduction, and the launch of training and synthsis for different example models:

- [>>> WaveFlow](./examples/waveflow)
- [>>> Clarinet](./examples/clarinet)
- [>>> WaveNet](./examples/wavenet)
- [>>> Deep Voice 3](./examples/deepvoice3)
- [>>> Transformer TTS](./examples/transformer_tts)
- [>>> FastSpeech](./examples/fastspeech)


## Pre-trained models and audio samples

77
Parakeet also releases some well-trained parameters for the example models, which can be accessed in the following tables. Each column of these tables lists resources for one model, including the url link to the pre-trained model, the dataset that the model is trained on, and synthesized audio samples based on the pre-trained model. Click each model name to download, then you can get the compressed package which contains the pre-trained model and the `yaml` config describing how the model is trained.
78

79 80 81
#### Vocoders

We provide the model checkpoints of WaveFlow with 64 and 128 residual channels, ClariNet and WaveNet.
82

Y
Yibing Liu 已提交
83
<div align="center">
84 85 86
<table>
    <thead>
        <tr>
L
liuyibing01 已提交
87
            <th  style="width: 250px">
88
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res64_ljspeech_ckpt_1.0.zip">WaveFlow (res. channels 64)</a>
Y
Yibing Liu 已提交
89 90
            </th>
            <th  style="width: 250px">
91
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res128_ljspeech_ckpt_1.0.zip">WaveFlow (res. channels 128)</a>
Y
Yibing Liu 已提交
92
            </th>
93 94 95 96
        </tr>
    </thead>
    <tbody>
        <tr>
L
liuyibing01 已提交
97
            <th>LJSpeech </th>
98
            <th>LJSpeech </th>
99 100
        </tr>
        <tr>
101 102 103 104 105 106 107 108 109 110 111 112
            <th>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res64_ljspeech_samples_1.0/step_3020k_sentence_0.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res64_ljspeech_samples_1.0/step_3020k_sentence_1.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res64_ljspeech_samples_1.0/step_3020k_sentence_2.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res64_ljspeech_samples_1.0/step_3020k_sentence_3.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res64_ljspeech_samples_1.0/step_3020k_sentence_4.wav">
            <img src="images/audio_icon.png" width=250 /></a>
            </th>
113
            <th>
114 115 116 117 118 119 120 121 122 123
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res128_ljspeech_samples_1.0/step_2000k_sentence_0.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res128_ljspeech_samples_1.0/step_2000k_sentence_1.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res128_ljspeech_samples_1.0/step_2000k_sentence_2.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res128_ljspeech_samples_1.0/step_2000k_sentence_3.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res128_ljspeech_samples_1.0/step_2000k_sentence_4.wav">
            <img src="images/audio_icon.png" width=250 /></a>
124
            </th>
125 126 127 128 129 130 131 132 133 134 135 136 137 138
        </tr>
    </tbody>
    <thead>
        <tr>
            <th  style="width: 250px">
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/clarinet_ljspeech_ckpt_1.0.zip">ClariNet</a>
            </th>
            <th  style="width: 250px">
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/wavenet_ljspeech_ckpt_1.0.zip">WaveNet</a>
            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
L
liuyibing01 已提交
139 140
            <th>LJSpeech </th>
            <th>LJSpeech </th>
141 142
        </tr>
        <tr>
143
            <th>
Y
Yibing Liu 已提交
144 145 146 147 148 149 150 151 152
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/clarinet_ljspeech_samples_1.0/step_500000_sentence_0.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/clarinet_ljspeech_samples_1.0/step_500000_sentence_1.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/clarinet_ljspeech_samples_1.0/step_500000_sentence_2.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/clarinet_ljspeech_samples_1.0/step_500000_sentence_3.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/clarinet_ljspeech_samples_1.0/step_500000_sentence_4.wav">
L
liuyibing01 已提交
153
            <img src="images/audio_icon.png" width=250 /></a>  
154
            </th>
155 156 157 158 159 160 161 162 163 164 165 166
            <th>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/wavenet_ljspeech_samples_1.0/step_2450k_sentence_0.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/wavenet_ljspeech_samples_1.0/step_2450k_sentence_1.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/wavenet_ljspeech_samples_1.0/step_2450k_sentence_2.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/wavenet_ljspeech_samples_1.0/step_2450k_sentence_3.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/wavenet_ljspeech_samples_1.0/step_2450k_sentence_4.wav">
            <img src="images/audio_icon.png" width=250 /></a>  
            </th>
167 168 169
        </tr>
    </tbody>
</table>
Y
Yibing Liu 已提交
170
</div>
171

L
liuyibing01 已提交
172

173
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**Note:** The input mel spectrogams are from validation dataset, which are not seen during training.
174

175 176
#### TTS models

177 178 179 180 181 182 183 184 185 186 187 188 189 190
We also provide checkpoints for different end-to-end TTS models, and present the synthesized audio examples for some randomly chosen famous quotes. The corresponding texts are displayed as follows.

||Text | From |
|:-:|:-- | :--: | 
0|*Life was like a box of chocolates, you never know what you're gonna get.* | *Forrest Gump* |  
1|*With great power there must come great responsibility.* | *Spider-Man*|
2|*To be or not to be, that’s a question.*|*Hamlet*|
3|*Death is just a part of life, something we're all destined to do.*| *Forrest Gump*|
4|*Don’t argue with the people of strong determination, because they may change the fact!*| *William Shakespeare* |

Users have the option to use different vocoders to convert the linear/mel spectrogam to the raw audio in TTS models. Taking this into account, we are going to release the checkpoints for TTS models adapted to different vocoders, including the [Griffin-Lim](https://ieeexplore.ieee.org/document/1164317) algorithm and some neural vocoders.

##### 1) Griffin-Lim

191 192 193 194
<div align="center">
<table>
    <thead>
        <tr>
195 196 197
             <th  style="width: 250px">
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/deepvoice3_ljspeech_griffin-lim_ckpt_1.0.zip">Deep Voice 3</a>
            </th>
198
            <th  style="width: 250px">
199
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/transformer_tts_ljspeech_griffin-lim_ckpt_1.0.zip">Transformer TTS</a>
200 201
            </th>
            <th  style="width: 250px">
202
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/fastspeech_ljspeech_griffin-lim_ckpt_1.0.zip">FastSpeech</a>
203
            </th>
204
                    </tr>
205 206 207 208 209
    </thead>
    <tbody>
        <tr>
            <th>LJSpeech </th>
            <th>LJSpeech </th>
210
            <th>LJSpeech </th>
211 212 213
        </tr>
        <tr>
            <th style="height: 150px">
214 215 216 217 218 219 220 221 222 223
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/deepvoice3_ljspeech_griffin-lim_samples_1.0/step_1560000_sentence_0.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/deepvoice3_ljspeech_griffin-lim_samples_1.0/step_1560000_sentence_1.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/deepvoice3_ljspeech_griffin-lim_samples_1.0/step_1560000_sentence_2.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/deepvoice3_ljspeech_griffin-lim_samples_1.0/step_1560000_sentence_3.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/deepvoice3_ljspeech_griffin-lim_samples_1.0/step_1560000_sentence_4.wav">
            <img src="images/audio_icon.png" width=250 /></a>  
224 225
            </th>
            <th >
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/transformer_tts_ljspeech_griffin-lim_samples_1.0/step_120000_sentence_0.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/transformer_tts_ljspeech_griffin-lim_samples_1.0/step_120000_sentence_1.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/transformer_tts_ljspeech_griffin-lim_samples_1.0/step_120000_sentence_2.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/transformer_tts_ljspeech_griffin-lim_samples_1.0/step_120000_sentence_3.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/transformer_tts_ljspeech_griffin-lim_samples_1.0/step_120000_sentence_4.wav">
            <img src="images/audio_icon.png" width=250 /></a> 
            </th>
            <th >
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/fastspeech_ljspeech_griffin-lim_samples_1.0/step_130000_sentence_0.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/fastspeech_ljspeech_griffin-lim_samples_1.0/step_130000_sentence_1.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/fastspeech_ljspeech_griffin-lim_samples_1.0/step_130000_sentence_2.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/fastspeech_ljspeech_griffin-lim_samples_1.0/step_130000_sentence_3.wav">
            <img src="images/audio_icon.png" width=250 /></a><br>
            <a href="https://paddlespeech.bj.bcebos.com/Parakeet/fastspeech_ljspeech_griffin-lim_samples_1.0/step_130000_sentence_4.wav">
            <img src="images/audio_icon.png" width=250 /></a> 
248 249 250 251 252 253
            </th>
        </tr>
    </tbody>
    <thead>
</table>
</div>
254

255
##### 2) Neural vocoders
256

257
under preparation
L
liuyibing01 已提交
258 259 260 261

## Copyright and License

Parakeet is provided under the [Apache-2.0 license](LICENSE).