Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
7d4f3208
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看板
提交
7d4f3208
编写于
6月 21, 2022
作者:
L
lym0302
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix_model_init, test=doc
上级
0ea9def0
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
20 addition
and
13 deletion
+20
-13
paddlespeech/server/engine/tts/online/onnx/tts_engine.py
paddlespeech/server/engine/tts/online/onnx/tts_engine.py
+20
-13
未找到文件。
paddlespeech/server/engine/tts/online/onnx/tts_engine.py
浏览文件 @
7d4f3208
...
...
@@ -66,15 +66,15 @@ class TTSServerExecutor(TTSExecutor):
return
# am
am_tag
=
am
+
'-'
+
lang
if
am
==
"fastspeech2_csmsc_onnx"
:
# get model info
if
am_ckpt
is
None
or
phones_dict
is
None
:
self
.
task_resource
.
set_task_model
(
model_tag
=
am_tag
,
model_type
=
0
,
# am
version
=
None
,
# default version
)
self
.
am_res_path
=
self
.
task_resource
.
res_dir
if
am
==
"fastspeech2_csmsc_onnx"
:
# get model info
if
am_ckpt
is
None
or
phones_dict
is
None
:
self
.
am_ckpt
=
os
.
path
.
join
(
self
.
am_res_path
,
self
.
task_resource
.
res_dict
[
'ckpt'
][
0
])
# must have phones_dict in acoustic
...
...
@@ -86,13 +86,19 @@ class TTSServerExecutor(TTSExecutor):
self
.
am_ckpt
=
os
.
path
.
abspath
(
am_ckpt
[
0
])
self
.
phones_dict
=
os
.
path
.
abspath
(
phones_dict
)
self
.
am_res_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
self
.
am_ckpt
))
os
.
path
.
abspath
(
am_ckpt
))
# create am sess
self
.
am_sess
=
get_sess
(
self
.
am_ckpt
,
am_sess_conf
)
elif
am
==
"fastspeech2_cnndecoder_csmsc_onnx"
:
if
am_ckpt
is
None
or
am_stat
is
None
or
phones_dict
is
None
:
self
.
task_resource
.
set_task_model
(
model_tag
=
am_tag
,
model_type
=
0
,
# am
version
=
None
,
# default version
)
self
.
am_res_path
=
self
.
task_resource
.
res_dir
self
.
am_encoder_infer
=
os
.
path
.
join
(
self
.
am_res_path
,
self
.
task_resource
.
res_dict
[
'ckpt'
][
0
])
self
.
am_decoder
=
os
.
path
.
join
(
...
...
@@ -114,7 +120,7 @@ class TTSServerExecutor(TTSExecutor):
self
.
phones_dict
=
os
.
path
.
abspath
(
phones_dict
)
self
.
am_stat
=
os
.
path
.
abspath
(
am_stat
)
self
.
am_res_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
self
.
am_ckpt
))
os
.
path
.
abspath
(
am_ckpt
[
0
]
))
# create am sess
self
.
am_encoder_infer_sess
=
get_sess
(
self
.
am_encoder_infer
,
...
...
@@ -130,12 +136,13 @@ class TTSServerExecutor(TTSExecutor):
# voc model info
voc_tag
=
voc
+
'-'
+
lang
if
voc_ckpt
is
None
:
self
.
task_resource
.
set_task_model
(
model_tag
=
voc_tag
,
model_type
=
1
,
# vocoder
version
=
None
,
# default version
)
if
voc_ckpt
is
None
:
self
.
voc_res_path
=
self
.
task_resource
.
voc_res_dir
self
.
voc_ckpt
=
os
.
path
.
join
(
self
.
voc_res_path
,
self
.
task_resource
.
voc_res_dict
[
'ckpt'
])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录