From ca03f4db214b7300a00fd7159ee3a5b0a8fada91 Mon Sep 17 00:00:00 2001 From: Echo-Nie <157974576+Echo-Nie@users.noreply.github.com> Date: Tue, 18 Mar 2025 14:50:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90PaddleSpeech=20No.6=E3=80=91=E8=A1=A5?= =?UTF-8?q?=E5=85=A8=E5=90=88=E6=88=90=E7=B3=BB=E5=88=97=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=B8=AD=E5=8F=82=E6=95=B0=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=20(#4004)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * run.sh修改:为 synthesize 和 synthesize_e2e 添加 --stage 参数控制 vocoder 模型选择,REAMDE.md修改:补充 stage 参数说明,明确 vocoder 选择逻辑 * 添加run.sh中stage参数相关的注释 * HiFiGAN改为MultiBand MelGAN * cmsc文件改回原位(No.15不修改),这里只对No.6做修改 --- examples/canton/tts3/README.md | 1 + examples/canton/tts3/run.sh | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/canton/tts3/README.md b/examples/canton/tts3/README.md index 87ef40907..d2c46f642 100644 --- a/examples/canton/tts3/README.md +++ b/examples/canton/tts3/README.md @@ -37,6 +37,7 @@ Run the command below to 3. train the model. 4. synthesize wavs. - synthesize waveform from `metadata.jsonl`. + - `--stage` controls the vocoder model during synthesis (0 = pwgan, 1 = hifigan). - synthesize waveform from text file. ```bash ./run.sh diff --git a/examples/canton/tts3/run.sh b/examples/canton/tts3/run.sh index acfc50223..0e1f52a1c 100755 --- a/examples/canton/tts3/run.sh +++ b/examples/canton/tts3/run.sh @@ -28,13 +28,13 @@ if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then fi if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then - # synthesize, vocoder is pwgan by default - CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh ${conf_path} ${train_output_path} ${ckpt_name} || exit -1 + # synthesize, vocoder is pwgan by default stage 0, stage 1 will use hifigan as vocoder + CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh --stage 0 ${conf_path} ${train_output_path} ${ckpt_name} || exit -1 fi if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then - # synthesize_e2e, vocoder is pwgan by default - CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize_e2e.sh ${conf_path} ${train_output_path} ${ckpt_name} || exit -1 + # synthesize_e2e, vocoder is pwgan by default stage 0, stage 1 will use hifigan as vocoder + CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize_e2e.sh --stage 0 ${conf_path} ${train_output_path} ${ckpt_name} || exit -1 fi if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; then