Skip to content

Commit ef29dbb

Browse files
authored
fix the tts2 (#4044)
1 parent ff61df9 commit ef29dbb

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

examples/csmsc/tts2/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ pwg_baker_ckpt_0.4
116116
```
117117
`./local/synthesize.sh` calls `${BIN_DIR}/../synthesize.py`, which can synthesize waveform from `metadata.jsonl`.
118118
```bash
119-
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh ${conf_path} ${train_output_path} ${ckpt_name}
119+
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh --stage 0 ${conf_path} ${train_output_path} ${ckpt_name}
120120
```
121+
`--stage` controls the vocoder model during synthesis, which can use stage `0-4` to select the vocoder to use {`pwgan`, `multi band melgan`, `style melgan`, `hifigan`, `wavernn`}
122+
121123
```text
122124
usage: synthesize.py [-h]
123125
[--am {speedyspeech_csmsc,fastspeech2_csmsc,fastspeech2_ljspeech,fastspeech2_aishell3,fastspeech2_vctk,tacotron2_csmsc,tacotron2_ljspeech,tacotron2_aishell3}]
@@ -164,8 +166,10 @@ optional arguments:
164166
```
165167
`./local/synthesize_e2e.sh` calls `${BIN_DIR}/../synthesize_e2e.py`, which can synthesize waveform from text file.
166168
```bash
167-
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize_e2e.sh ${conf_path} ${train_output_path} ${ckpt_name}
169+
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize_e2e.sh --stage 0 ${conf_path} ${train_output_path} ${ckpt_name}
168170
```
171+
`--stage` controls the vocoder model during synthesis, which can use stage `0,1,3,4` to select the vocoder to use {`pwgan`, `multi band melgan`, `hifigan`, `wavernn`}
172+
169173
```text
170174
usage: synthesize_e2e.py [-h]
171175
[--am {speedyspeech_csmsc,speedyspeech_aishell3,fastspeech2_csmsc,fastspeech2_ljspeech,fastspeech2_aishell3,fastspeech2_vctk,tacotron2_csmsc,tacotron2_ljspeech}]

examples/csmsc/tts2/run.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
2727
fi
2828

2929
if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
30-
# synthesize, vocoder is pwgan by default
31-
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh ${conf_path} ${train_output_path} ${ckpt_name} || exit -1
30+
# synthesize, vocoder is pwgan by default stage 0
31+
# use stage 1-4 to select the vocoder to use {multi band melgan, style melgan, hifigan, wavernn}
32+
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize.sh --stage 0 ${conf_path} ${train_output_path} ${ckpt_name} || exit -1
3233
fi
3334

3435
if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
35-
# synthesize_e2e, vocoder is pwgan by default
36-
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize_e2e.sh ${conf_path} ${train_output_path} ${ckpt_name} || exit -1
36+
# synthesize_e2e, vocoder is pwgan by default stage 0
37+
# use stage 1,3,4 to select the vocoder to use {multi band melgan, hifigan, wavernn}
38+
CUDA_VISIBLE_DEVICES=${gpus} ./local/synthesize_e2e.sh --stage 0 ${conf_path} ${train_output_path} ${ckpt_name} || exit -1
3739
fi
3840

3941
if [ ${stage} -le 4 ] && [ ${stop_stage} -ge 4 ]; then

0 commit comments

Comments
 (0)