File tree Expand file tree Collapse file tree 3 files changed +16
-15
lines changed
paddlespeech/t2s/exps/vits Expand file tree Collapse file tree 3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 77stop_stage=0
88
99if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
10- python3 ${BIN_DIR} /../ lite_predict.py \
10+ python3 ${BIN_DIR} /lite_predict.py \
1111 --inference_dir=${train_output_path} /pdlite \
1212 --am=vits_csmsc \
1313 --text=${BIN_DIR} /../sentences.txt \
Original file line number Diff line number Diff line change 5454# ./local/ort_predict.sh ${train_output_path}
5555# fi
5656
57- # # not ready yet for operator missing in Paddle-Lite
58- # # must run after stage 3 (which stage generated static models)
59- # if [ ${stage} -le 7 ] && [ ${stop_stage} -ge 7 ]; then
60- # # NOTE by yuantian 2022.11.21: please compile develop version of Paddle-Lite to export and run TTS models,
61- # # cause TTS models are supported by https://github.com/PaddlePaddle/Paddle-Lite/pull/9587
62- # # and https://github.com/PaddlePaddle/Paddle-Lite/pull/9706
63- # ./local/export2lite.sh ${train_output_path} inference pdlite vits_csmsc x86
64- # fi
57+ # not ready yet for operator missing in Paddle-Lite
58+ # must run after stage 3 (which stage generated static models)
59+ if [ ${stage} -le 7 ] && [ ${stop_stage} -ge 7 ]; then
60+ # NOTE by yuantian 2022.11.21: please compile develop version of Paddle-Lite to export and run TTS models,
61+ # cause TTS models are supported by https://github.com/PaddlePaddle/Paddle-Lite/pull/10128
62+ # vits can only run in arm
63+ ./local/export2lite.sh ${train_output_path} inference pdlite vits_csmsc arm
64+ fi
6565
66- # if [ ${stage} -le 8 ] && [ ${stop_stage} -ge 8 ]; then
67- # CUDA_VISIBLE_DEVICES=${gpus} ./local/lite_predict.sh ${train_output_path} || exit -1
68- # fi
66+ if [ ${stage} -le 8 ] && [ ${stop_stage} -ge 8 ]; then
67+ CUDA_VISIBLE_DEVICES=${gpus} ./local/lite_predict.sh ${train_output_path} || exit -1
68+ fi
6969
Original file line number Diff line number Diff line change 2121from paddlespeech .t2s .exps .lite_syn_utils import get_lite_predictor
2222from paddlespeech .t2s .exps .syn_utils import get_frontend
2323from paddlespeech .t2s .exps .syn_utils import get_sentences
24+ from paddlespeech .t2s .utils import str2bool
2425
2526
2627def parse_args ():
@@ -75,12 +76,12 @@ def main():
7576 # frontend
7677 frontend = get_frontend (
7778 lang = args .lang ,
78- phones_dict = args .phones_dict ,
79- tones_dict = args .tones_dict )
79+ phones_dict = args .phones_dict )
8080
8181 # am_predictor
82+ # vits can only run in arm
8283 am_predictor = get_lite_predictor (
83- model_dir = args .inference_dir , model_file = args .am + "_x86 .nb" )
84+ model_dir = args .inference_dir , model_file = args .am + "_arm .nb" )
8485 # model: {model_name}_{dataset}
8586 am_dataset = args .am [args .am .rindex ('_' ) + 1 :]
8687
You can’t perform that action at this time.
0 commit comments