Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
0282d45c
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看板
提交
0282d45c
编写于
4月 08, 2022
作者:
小湉湉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove fill_constant_batch_size_like in static model of speedyspeech, test=tts
上级
30628f68
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
4 deletion
+13
-4
examples/csmsc/tts3/run.sh
examples/csmsc/tts3/run.sh
+10
-2
paddlespeech/t2s/modules/positional_encoding.py
paddlespeech/t2s/modules/positional_encoding.py
+3
-2
未找到文件。
examples/csmsc/tts3/run.sh
浏览文件 @
0282d45c
...
...
@@ -44,7 +44,11 @@ fi
# paddle2onnx, please make sure the static models are in ${train_output_path}/inference first
# we have only tested the following models so far
if
[
${
stage
}
-le
5
]
&&
[
${
stop_stage
}
-ge
5
]
;
then
pip
install
paddle2onnx
==
0.9.4
# install paddle2onnx
version
=
$(
echo
`
pip list |grep
"paddle2onnx"
`
|awk
-F
" "
'{print $2}'
)
if
[[
-z
"
$version
"
||
${
version
}
!=
'0.9.4'
]]
;
then
pip
install
paddle2onnx
==
0.9.4
fi
./local/paddle2onnx.sh
${
train_output_path
}
inference inference_onnx fastspeech2_csmsc
./local/paddle2onnx.sh
${
train_output_path
}
inference inference_onnx hifigan_csmsc
./local/paddle2onnx.sh
${
train_output_path
}
inference inference_onnx mb_melgan_csmsc
...
...
@@ -52,6 +56,10 @@ fi
# inference with onnxruntime, use fastspeech2 + hifigan by default
if
[
${
stage
}
-le
6
]
&&
[
${
stop_stage
}
-ge
6
]
;
then
pip
install
onnxruntime
# install onnxruntime
version
=
$(
echo
`
pip list |grep
"onnxruntime"
`
|awk
-F
" "
'{print $2}'
)
if
[[
-z
"
$version
"
||
${
version
}
!=
'1.10.0'
]]
;
then
pip
install
onnxruntime
==
1.10.0
fi
./local/ort_predict.sh
${
train_output_path
}
fi
paddlespeech/t2s/modules/positional_encoding.py
浏览文件 @
0282d45c
...
...
@@ -31,8 +31,9 @@ def sinusoid_position_encoding(num_positions: int,
channel
=
paddle
.
arange
(
0
,
feature_size
,
2
,
dtype
=
dtype
)
index
=
paddle
.
arange
(
start_pos
,
start_pos
+
num_positions
,
1
,
dtype
=
dtype
)
p
=
(
paddle
.
unsqueeze
(
index
,
-
1
)
*
omega
)
/
(
10000.0
**
(
channel
/
float
(
feature_size
)))
denominator
=
channel
/
float
(
feature_size
)
denominator
=
paddle
.
to_tensor
([
10000.0
],
dtype
=
'float32'
)
**
denominator
p
=
(
paddle
.
unsqueeze
(
index
,
-
1
)
*
omega
)
/
denominator
encodings
=
paddle
.
zeros
([
num_positions
,
feature_size
],
dtype
=
dtype
)
encodings
[:,
0
::
2
]
=
paddle
.
sin
(
p
)
encodings
[:,
1
::
2
]
=
paddle
.
cos
(
p
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录