Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
54ef90fc
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 2 年 前同步成功
通知
210
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
54ef90fc
编写于
4月 06, 2023
作者:
小湉湉
提交者:
GitHub
4月 06, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TTS]Fix VITS lite infer (#3098)
上级
d3d86f59
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
15 deletion
+16
-15
examples/csmsc/vits/local/lite_predict.sh
examples/csmsc/vits/local/lite_predict.sh
+1
-1
examples/csmsc/vits/run.sh
examples/csmsc/vits/run.sh
+11
-11
paddlespeech/t2s/exps/vits/lite_predict.py
paddlespeech/t2s/exps/vits/lite_predict.py
+4
-3
未找到文件。
examples/csmsc/vits/local/lite_predict.sh
浏览文件 @
54ef90fc
...
...
@@ -7,7 +7,7 @@ stage=0
stop_stage
=
0
if
[
${
stage
}
-le
0
]
&&
[
${
stop_stage
}
-ge
0
]
;
then
python3
${
BIN_DIR
}
/
../
lite_predict.py
\
python3
${
BIN_DIR
}
/lite_predict.py
\
--inference_dir
=
${
train_output_path
}
/pdlite
\
--am
=
vits_csmsc
\
--text
=
${
BIN_DIR
}
/../sentences.txt
\
...
...
examples/csmsc/vits/run.sh
浏览文件 @
54ef90fc
...
...
@@ -54,16 +54,16 @@ fi
# ./local/ort_predict.sh ${train_output_path}
# fi
#
#
not ready yet for operator missing in Paddle-Lite
#
#
must run after stage 3 (which stage generated static models)
#
if [ ${stage} -le 7 ] && [ ${stop_stage} -ge 7 ]; then
#
# NOTE by yuantian 2022.11.21: please compile develop version of Paddle-Lite to export and run TTS models,
# # cause TTS models are supported by https://github.com/PaddlePaddle/Paddle-Lite/pull/9587
# # and https://github.com/PaddlePaddle/Paddle-Lite/pull/9706
# ./local/export2lite.sh ${train_output_path} inference pdlite vits_csmsc x86
#
fi
# not ready yet for operator missing in Paddle-Lite
# must run after stage 3 (which stage generated static models)
if
[
${
stage
}
-le
7
]
&&
[
${
stop_stage
}
-ge
7
]
;
then
# NOTE by yuantian 2022.11.21: please compile develop version of Paddle-Lite to export and run TTS models,
# cause TTS models are supported by https://github.com/PaddlePaddle/Paddle-Lite/pull/10128
# vits can only run in arm
./local/export2lite.sh
${
train_output_path
}
inference pdlite vits_csmsc arm
fi
#
if [ ${stage} -le 8 ] && [ ${stop_stage} -ge 8 ]; then
#
CUDA_VISIBLE_DEVICES=${gpus} ./local/lite_predict.sh ${train_output_path} || exit -1
#
fi
if
[
${
stage
}
-le
8
]
&&
[
${
stop_stage
}
-ge
8
]
;
then
CUDA_VISIBLE_DEVICES
=
${
gpus
}
./local/lite_predict.sh
${
train_output_path
}
||
exit
-1
fi
paddlespeech/t2s/exps/vits/lite_predict.py
浏览文件 @
54ef90fc
...
...
@@ -21,6 +21,7 @@ from paddlespeech.t2s.exps.lite_syn_utils import get_lite_am_output
from
paddlespeech.t2s.exps.lite_syn_utils
import
get_lite_predictor
from
paddlespeech.t2s.exps.syn_utils
import
get_frontend
from
paddlespeech.t2s.exps.syn_utils
import
get_sentences
from
paddlespeech.t2s.utils
import
str2bool
def
parse_args
():
...
...
@@ -75,12 +76,12 @@ def main():
# frontend
frontend
=
get_frontend
(
lang
=
args
.
lang
,
phones_dict
=
args
.
phones_dict
,
tones_dict
=
args
.
tones_dict
)
phones_dict
=
args
.
phones_dict
)
# am_predictor
# vits can only run in arm
am_predictor
=
get_lite_predictor
(
model_dir
=
args
.
inference_dir
,
model_file
=
args
.
am
+
"_
x86
.nb"
)
model_dir
=
args
.
inference_dir
,
model_file
=
args
.
am
+
"_
arm
.nb"
)
# model: {model_name}_{dataset}
am_dataset
=
args
.
am
[
args
.
am
.
rindex
(
'_'
)
+
1
:]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录