Parakeet/README.md

213 lines
9.7 KiB
Markdown
Raw Normal View History

2019-11-13 22:22:46 +08:00
# Parakeet
2020-03-05 08:47:07 +08:00
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.
2020-03-05 10:40:42 +08:00
<div align="center">
<img src="images/logo.png" width=450 /> <br>
</div>
2020-03-10 17:43:00 +08:00
In particular, it features the latest [WaveFlow](https://arxiv.org/abs/1912.01219) model proposed by Baidu Research.
2020-03-10 01:53:24 +08:00
2020-03-10 17:43:00 +08:00
- 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.
2020-03-10 12:55:12 +08:00
- 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).
- 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.
2020-03-05 09:46:03 +08:00
2020-03-10 01:53:24 +08:00
## Overview
2020-03-10 17:02:45 +08:00
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:
2020-03-10 01:53:24 +08:00
- 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.
2020-03-10 09:51:01 +08:00
See the [guide](docs/experiment_guide.md) for details about how to build your own model and experiment in Parakeet.
2020-03-10 01:53:24 +08:00
## Setup
2020-02-25 14:39:43 +08:00
2020-03-05 08:47:07 +08:00
Make sure the library `libsndfile1` is installed, e.g., on Ubuntu.
2020-02-25 14:39:43 +08:00
```bash
sudo apt-get install libsndfile1
```
2019-11-13 22:22:46 +08:00
2020-02-25 14:39:43 +08:00
### Install PaddlePaddle
2020-05-08 09:43:05 +08:00
See [install](https://www.paddlepaddle.org.cn/install/quick) for more details. This repo requires PaddlePaddle **1.8.0** or above.
### Install Parakeet
2019-11-13 22:22:46 +08:00
```bash
2020-03-10 01:53:24 +08:00
git clone https://github.com/PaddlePaddle/Parakeet
cd Parakeet
pip install -e .
2019-11-13 22:22:46 +08:00
```
### Install CMUdict for nltk
CMUdict from nltk is used to transform text into phonemes.
2020-03-10 01:53:24 +08:00
```python
import nltk
nltk.download("punkt")
nltk.download("cmudict")
```
## Examples
2020-03-10 01:53:24 +08:00
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
2020-03-26 14:45:22 +08:00
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.
2020-03-10 01:53:24 +08:00
#### Vocoders
We provide the model checkpoints of WaveFlow with 64 and 128 residual channels, ClariNet and WaveNet.
2020-03-10 01:53:24 +08:00
2020-03-10 16:41:10 +08:00
<div align="center">
2020-03-10 01:53:24 +08:00
<table>
<thead>
<tr>
2020-03-12 22:20:46 +08:00
<th style="width: 250px">
<a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res64_ljspeech_ckpt_1.0.zip">WaveFlow (res. channels 64)</a>
2020-03-10 16:41:10 +08:00
</th>
<th style="width: 250px">
<a href="https://paddlespeech.bj.bcebos.com/Parakeet/waveflow_res128_ljspeech_ckpt_1.0.zip">WaveFlow (res. channels 128)</a>
2020-03-10 16:41:10 +08:00
</th>
2020-03-10 01:53:24 +08:00
</tr>
</thead>
<tbody>
<tr>
2020-03-26 14:45:22 +08:00
<th>LJSpeech </th>
<th>LJSpeech </th>
2020-03-10 01:53:24 +08:00
</tr>
<tr>
<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>
2020-03-10 01:53:24 +08:00
<th>
<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>
2020-03-10 01:53:24 +08:00
</th>
</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>
2020-03-26 14:45:22 +08:00
<th>LJSpeech </th>
<th>LJSpeech </th>
</tr>
<tr>
2020-03-10 01:53:24 +08:00
<th>
2020-03-10 16:11:28 +08:00
<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">
2020-03-12 22:20:46 +08:00
<img src="images/audio_icon.png" width=250 /></a>
2020-03-10 01:53:24 +08:00
</th>
<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>
2020-03-10 01:53:24 +08:00
</tr>
</tbody>
</table>
2020-03-10 16:41:10 +08:00
</div>
2020-03-10 01:53:24 +08:00
2020-03-10 12:55:12 +08:00
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**Note:** The input mel spectrogams are from validation dataset, which are not seen during training.
2020-03-10 01:53:24 +08:00
#### TTS models
<div align="center">
<table>
<thead>
<tr>
<th style="width: 250px">
Deep Voice 3
</th>
<th style="width: 250px">
Transformer TTS
</th>
</tr>
</thead>
<tbody>
<tr>
<th>LJSpeech </th>
<th>LJSpeech </th>
</tr>
<tr>
<th style="height: 150px">
To be added soon
</th>
<th >
To be added soon
</th>
</tr>
</tbody>
<thead>
</table>
</div>
2020-03-10 01:53:24 +08:00
2020-03-10 22:46:23 +08:00
Click each link to download, then you can get the compressed package which contains the pre-trained model and the `yaml` config describing how to train the model.
2020-03-10 01:53:24 +08:00
2020-02-27 12:21:52 +08:00
## Copyright and License
Parakeet is provided under the [Apache-2.0 license](LICENSE).