-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TTS]Add TTS Paddle-Lite x86 inference (#2667)
* Add export2lite, test=tts * add tts paddlelite x86 inference, test=tts * update released_model.md, test=tts * add paddlelite in setup.py * update
- Loading branch information
1 parent
1c3d2cb
commit 0b4cf22
Showing
33 changed files
with
839 additions
and
74 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
train_output_path=$1 | ||
|
||
stage=0 | ||
stop_stage=0 | ||
|
||
# pwgan | ||
if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then | ||
python3 ${BIN_DIR}/../lite_predict.py \ | ||
--inference_dir=${train_output_path}/pdlite \ | ||
--am=fastspeech2_aishell3 \ | ||
--voc=pwgan_aishell3 \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out \ | ||
--phones_dict=dump/phone_id_map.txt \ | ||
--speaker_dict=dump/speaker_id_map.txt \ | ||
--spk_id=0 | ||
fi | ||
|
||
# hifigan | ||
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then | ||
python3 ${BIN_DIR}/../lite_predict.py \ | ||
--inference_dir=${train_output_path}/pdlite \ | ||
--am=fastspeech2_aishell3 \ | ||
--voc=hifigan_aishell3 \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out \ | ||
--phones_dict=dump/phone_id_map.txt \ | ||
--speaker_dict=dump/speaker_id_map.txt \ | ||
--spk_id=0 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
train_output_path=$1 | ||
|
||
stage=0 | ||
stop_stage=0 | ||
|
||
# pwgan | ||
if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then | ||
python3 ${BIN_DIR}/../lite_predict.py \ | ||
--inference_dir=${train_output_path}/pdlite \ | ||
--am=speedyspeech_csmsc \ | ||
--voc=pwgan_csmsc \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out \ | ||
--phones_dict=dump/phone_id_map.txt \ | ||
--tones_dict=dump/tone_id_map.txt | ||
fi | ||
|
||
# for more GAN Vocoders | ||
# multi band melgan | ||
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then | ||
python3 ${BIN_DIR}/../lite_predict.py \ | ||
--inference_dir=${train_output_path}/pdlite \ | ||
--am=speedyspeech_csmsc \ | ||
--voc=mb_melgan_csmsc \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out \ | ||
--phones_dict=dump/phone_id_map.txt \ | ||
--tones_dict=dump/tone_id_map.txt | ||
fi | ||
|
||
# hifigan | ||
if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then | ||
python3 ${BIN_DIR}/../lite_predict.py \ | ||
--inference_dir=${train_output_path}/pdlite \ | ||
--am=speedyspeech_csmsc \ | ||
--voc=hifigan_csmsc \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out \ | ||
--phones_dict=dump/phone_id_map.txt \ | ||
--tones_dict=dump/tone_id_map.txt | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
train_output_path=$1 | ||
|
||
stage=0 | ||
stop_stage=0 | ||
|
||
# pwgan | ||
if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then | ||
python3 ${BIN_DIR}/../lite_predict.py \ | ||
--inference_dir=${train_output_path}/pdlite \ | ||
--am=fastspeech2_csmsc \ | ||
--voc=pwgan_csmsc \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out \ | ||
--phones_dict=dump/phone_id_map.txt | ||
fi | ||
|
||
# for more GAN Vocoders | ||
# multi band melgan | ||
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then | ||
python3 ${BIN_DIR}/../lite_predict.py \ | ||
--inference_dir=${train_output_path}/pdlite \ | ||
--am=fastspeech2_csmsc \ | ||
--voc=mb_melgan_csmsc \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out \ | ||
--phones_dict=dump/phone_id_map.txt | ||
fi | ||
|
||
# hifigan | ||
if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then | ||
python3 ${BIN_DIR}/../lite_predict.py \ | ||
--inference_dir=${train_output_path}/pdlite \ | ||
--am=fastspeech2_csmsc \ | ||
--voc=hifigan_csmsc \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out \ | ||
--phones_dict=dump/phone_id_map.txt | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
train_output_path=$1 | ||
|
||
stage=0 | ||
stop_stage=0 | ||
|
||
# pwgan | ||
if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then | ||
python3 ${BIN_DIR}/../lite_predict_streaming.py \ | ||
--inference_dir=${train_output_path}/pdlite_streaming \ | ||
--am=fastspeech2_csmsc \ | ||
--am_stat=dump/train/speech_stats.npy \ | ||
--voc=pwgan_csmsc \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out_streaming \ | ||
--phones_dict=dump/phone_id_map.txt \ | ||
--am_streaming=True | ||
fi | ||
|
||
# for more GAN Vocoders | ||
# multi band melgan | ||
if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then | ||
python3 ${BIN_DIR}/../lite_predict_streaming.py \ | ||
--inference_dir=${train_output_path}/pdlite_streaming \ | ||
--am=fastspeech2_csmsc \ | ||
--am_stat=dump/train/speech_stats.npy \ | ||
--voc=mb_melgan_csmsc \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out_streaming \ | ||
--phones_dict=dump/phone_id_map.txt \ | ||
--am_streaming=True | ||
fi | ||
|
||
# hifigan | ||
if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then | ||
python3 ${BIN_DIR}/../lite_predict_streaming.py \ | ||
--inference_dir=${train_output_path}/pdlite_streaming \ | ||
--am=fastspeech2_csmsc \ | ||
--am_stat=dump/train/speech_stats.npy \ | ||
--voc=hifigan_csmsc \ | ||
--text=${BIN_DIR}/../sentences.txt \ | ||
--output_dir=${train_output_path}/lite_infer_out_streaming \ | ||
--phones_dict=dump/phone_id_map.txt \ | ||
--am_streaming=True | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.