PaddleSpeech icon indicating copy to clipboard operation
PaddleSpeech copied to clipboard

[TTS]fix dygraph to static for tacotron2, test=doc

Open yt605155624 opened this issue 1 year ago • 0 comments

git clone PaddleSpeech
cd PaddleSpeech
# 安装依赖,安装过了可忽略
pip install . 
cd examples/csmsc/tts0
wget https://paddlespeech.bj.bcebos.com/Parakeet/released_models/pwgan/pwg_baker_ckpt_0.4.zip
unzip pwg_baker_ckpt_0.4.zip
wget https://paddlespeech.bj.bcebos.com/Parakeet/released_models/tacotron2/tacotron2_csmsc_ckpt_0.2.0.zip
unzip tacotron2_csmsc_ckpt_0.2.0.zip
mkdir -p dump/train
mkdir -p exp/default/checkpoints
cp tacotron2_csmsc_ckpt_0.2.0/snapshot_iter_30600.pdz exp/default/checkpoints
cp tacotron2_csmsc_ckpt_0.2.0/speech_stats.npy dump/train
cp tacotron2_csmsc_ckpt_0.2.0/phone_id_map.txt dump/
vim run.sh
修改 ckpt_name=snapshot_iter_30600.pdz
# 执行动转静并 load 之后进行推理
# 如果想要仅执行动态图推理,不执行动转静,注释掉 local/synthesize_e2e.sh 28 行和 27 行最后的 "\"
./run.sh --stage 3 --stop-stage 3
# 生成的静态图模型在 ./exp/default/inference
# stage 3 执行后生成的音频在 ./exp/default/test_e2e
# 静态图推理
./run.sh --stage 4 --stop-stage 4
# stage 4 执行后生成的音频在 ./exp/default/pd_infer_out
python3 -m http.server 8097 开个端口可在网页上听音频
paddle 2.3.2 正常合成,paddle commit:e1a5fb8f653c0c948abcebb3e3e252edd724f05c 合成音频内容不对

yt605155624 avatar Sep 20 '22 11:09 yt605155624