PaddleSpeech

By admin , 11 六月, 2025

这是zhtts作者推荐的TTS:

https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/README_cn.md#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B

安装使用步骤

1. 创建Python 3.11环境

conda create -y -name paddle python=3.11
conda activate paddle

2. 安装PaddlePaddle框架

python -m pip install paddlepaddle==3.2.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/

3. 安装PaddleSpeech

git clone https://github.com/PaddlePaddle/PaddleSpeech.git
cd PaddleSpeech
pip install pytest-runner
pip install .

4. 回滚一个包版本,否则会运行报错:ImportError: cannot import name 'download' from 'aistudio_sdk.hub'

pip install aistudio-sdk==0.2.6

5. 运行

paddlespeech tts --input "你好,欢迎使用百度飞桨深度学习框架!" --output output.wav

粤语安装使用步骤

6. 初始化环境

cd examples/canton/tts3
source path.sh

7. 下载预训练模型

wget https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_canton_ckpt_1.4.0.zip
unzip fastspeech2_canton_ckpt_1.4.0.zip
wget https://paddlespeech.cdn.bcebos.com/Parakeet/released_models/pwgan/pwg_aishell3_ckpt_0.5.zip
unzip pwg_aishell3_ckpt_0.5.zip

8. 运行测试

python3 ${BIN_DIR}/../synthesize_e2e.py   --am=fastspeech2_aishell3   --am_config=fastspeech2_canton_ckpt_1.4.0/default.yaml   --am_ckpt=fastspeech2_canton_ckpt_1.4.0/snapshot_iter_140000.pdz   --am_stat=fastspeech2_canton_ckpt_1.4.0/speech_stats.npy   --voc=pwgan_aishell3   --voc_config=pwg_aishell3_ckpt_0.5/default.yaml   --voc_ckpt=pwg_aishell3_ckpt_0.5/snapshot_iter_1000000.pdz   --voc_stat=pwg_aishell3_ckpt_0.5/feats_stats.npy   --lang=canton   --text=${BIN_DIR}/../../assets/sentences_canton.txt   --output_dir=exp/default/test_e2e   --phones_dict=fastspeech2_canton_ckpt_1.4.0/phone_id_map.txt   --speaker_dict=fastspeech2_canton_ckpt_1.4.0/speaker_id_map.txt   --spk_id=10   --inference_dir=exp/default/inference --ngpu=0

参考:https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/examples/canton/tts3

 

标签

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
CAPTCHA
请输入"Drupal"
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

最新内容