This is a modification and adpation of fastspeech2 to mandrin(普通话). Many modifications to the origin paper, including:
New audios for aishell3 added. Checkpoints and training scripts for multispeaker will be ready soon.
Audio samples for biaobei and aishell3 can also be found in this page
All experiments were done under ubuntu16.04 + python3.7 + torch 1.7.1. Other env probably works too.
First clone the project
git clone https://github.com/ranchlai/mandarin-tts.git
If too slow, try
git clone https://hub.fastgit.org/ranchlai/mandarin-tts.git
To install all dependencies, run
sudo apt-get install ffmpeg
pip3 install -r requirements.txt
python synthesize.py --input="您的电话余额不足,请及时充值"
(see this issue for help)
or put all text in input.txt, then
python synthesize.py --input="./input.txt"
Checkpoints and waveglow should be downloaded at 1st run. You will see some files in ./checkpoint
, and ./waveglow
In case it fails, download the checkpoint manully here
(under testing)
Currently I am use baker dataset(标贝), which can be downloaded from baker。 The dataset is for non-commercial purpose only, and so is the pretrained model.
I have processed the data for this experiment. You can also try
python3 preprocess_pinyin.py
python3 preprocess_hanzi.py
to generate required aligments, mels, vocab for pinyin and hanzi for training. Everythin should be ready under the directory './data/'(you can change the directory in hparams.py) before training.
python3 train.py
you can monitor the log in '/home/<user>/.perf_logger/'
Best practice: copy the ./data folder to /dev/shm to avoid harddisk reading (if you have big enough memorry)
The following are some spectrograms synthesized at step 300000
FastSpeech 2: Fast and High-Quality End-to-End Text to Speech, Y. Ren, et al.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。