From 5d5de123586750df4ebea4dbe4927a01c89c104d Mon Sep 17 00:00:00 2001 From: nyx-c-language Date: Sat, 15 Mar 2025 17:48:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=A8=E5=90=88=E6=88=90=E7=B3=BB?= =?UTF-8?q?=E5=88=97=E4=B8=AD=E7=9A=84=E8=84=9A=E6=9C=AC=E4=B8=AD=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=BC=BA=E5=A4=B1=EF=BC=9Acsmsc/tts3=EF=BC=9B?= =?UTF-8?q?=E4=B8=BA=E4=BA=86=E4=BF=9D=E8=AF=81=E6=96=87=E6=A1=A3=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=80=A7=EF=BC=8C=E5=9C=A8=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=AF=AD=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3=E7=9A=84=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E4=B9=9F=E8=A1=A5=E5=85=85=E5=85=B6=E4=B8=AD=E7=9A=84?= =?UTF-8?q?README=5Fcn=E6=96=87=E6=A1=A3=E4=B8=AD=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E5=86=85=E5=AE=B9=EF=BC=88=E4=B8=8D=E5=9C=A8=E5=BC=80?= =?UTF-8?q?=E6=BA=90=E6=B4=BB=E5=8A=A8=E8=8C=83=E7=95=B4=E5=86=85=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/csmsc/tts3/README.md | 4 +++- examples/csmsc/tts3/README_cn.md | 4 +++- examples/csmsc/tts3/run.sh | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/csmsc/tts3/README.md b/examples/csmsc/tts3/README.md index 5a0975376..2e952bcef 100644 --- a/examples/csmsc/tts3/README.md +++ b/examples/csmsc/tts3/README.md @@ -107,8 +107,10 @@ pwg_baker_ckpt_0.4 ``` `./local/synthesize.sh` calls `${BIN_DIR}/../synthesize.py`, which can synthesize waveform from `metadata.jsonl`. ```bash -CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh ${conf_path} ${train_output_path} ${ckpt_name} +CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh --stage 0 ${conf_path} ${train_output_path} ${ckpt_name} ``` +`--stage` controls the vocoder model during synthesis, which can be `0` or `1`, use `pwgan` or `hifigan` model as vocoder. + ```text usage: synthesize.py [-h] [--am {speedyspeech_csmsc,fastspeech2_csmsc,fastspeech2_ljspeech,fastspeech2_aishell3,fastspeech2_vctk,tacotron2_csmsc,tacotron2_ljspeech,tacotron2_aishell3}] diff --git a/examples/csmsc/tts3/README_cn.md b/examples/csmsc/tts3/README_cn.md index 3f2783a97..7f5731b17 100644 --- a/examples/csmsc/tts3/README_cn.md +++ b/examples/csmsc/tts3/README_cn.md @@ -113,8 +113,10 @@ pwg_baker_ckpt_0.4 `./local/synthesize.sh` 调用 `${BIN_DIR}/../synthesize.py` 即可从 `metadata.jsonl`中合成波形。 ```bash -CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh ${conf_path} ${train_output_path} ${ckpt_name} +CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh --stage 0 ${conf_path} ${train_output_path} ${ckpt_name} ``` +`--stage` 用于合成过程中控制声码器模型,可取值为 `0` 或 `1`,分别对应使用 `pwgan` 或 `hifigan` 模型作为声码器。 + ```text usage: synthesize.py [-h] [--am {speedyspeech_csmsc,fastspeech2_csmsc,fastspeech2_ljspeech,fastspeech2_aishell3,fastspeech2_vctk,tacotron2_csmsc,tacotron2_ljspeech,tacotron2_aishell3}] diff --git a/examples/csmsc/tts3/run.sh b/examples/csmsc/tts3/run.sh index a7b4e4239..a90eb68d6 100755 --- a/examples/csmsc/tts3/run.sh +++ b/examples/csmsc/tts3/run.sh @@ -27,13 +27,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