Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
17f2944a
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
9 个月 前同步成功
通知
200
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看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
17f2944a
编写于
5月 22, 2023
作者:
Z
zoooo0820
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix error in tts/st
上级
5f53e902
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
4 addition
and
4 deletion
+4
-4
paddlespeech/cli/st/infer.py
paddlespeech/cli/st/infer.py
+1
-1
paddlespeech/cli/tts/infer.py
paddlespeech/cli/tts/infer.py
+1
-1
paddlespeech/t2s/models/fastspeech2/fastspeech2.py
paddlespeech/t2s/models/fastspeech2/fastspeech2.py
+1
-1
paddlespeech/t2s/modules/nets_utils.py
paddlespeech/t2s/modules/nets_utils.py
+1
-1
未找到文件。
paddlespeech/cli/st/infer.py
浏览文件 @
17f2944a
...
...
@@ -252,7 +252,7 @@ class STExecutor(BaseExecutor):
norm_feat
=
dict
(
kaldiio
.
load_ark
(
process
.
stdout
))[
utt_name
]
self
.
_inputs
[
"audio"
]
=
paddle
.
to_tensor
(
norm_feat
).
unsqueeze
(
0
)
self
.
_inputs
[
"audio_len"
]
=
paddle
.
to_tensor
(
self
.
_inputs
[
"audio"
].
shape
[
1
],
dtype
=
"int64"
)
self
.
_inputs
[
"audio"
].
shape
[
1
:
2
],
dtype
=
"int64"
)
else
:
raise
ValueError
(
"Wrong model type."
)
...
...
paddlespeech/cli/tts/infer.py
浏览文件 @
17f2944a
...
...
@@ -491,7 +491,7 @@ class TTSExecutor(BaseExecutor):
# multi speaker
if
am_dataset
in
{
'aishell3'
,
'vctk'
,
'mix'
,
'canton'
}:
mel
=
self
.
am_inference
(
part_phone_ids
,
spk_id
=
paddle
.
to_tensor
(
spk_id
))
part_phone_ids
,
spk_id
=
paddle
.
to_tensor
(
[
spk_id
]
))
else
:
mel
=
self
.
am_inference
(
part_phone_ids
)
self
.
am_time
+=
(
time
.
time
()
-
am_st
)
...
...
paddlespeech/t2s/models/fastspeech2/fastspeech2.py
浏览文件 @
17f2944a
...
...
@@ -783,7 +783,7 @@ class FastSpeech2(nn.Layer):
x
=
paddle
.
cast
(
text
,
'int64'
)
d
,
p
,
e
=
durations
,
pitch
,
energy
# setup batch axis
ilens
=
paddle
.
shape
(
x
)[
0
]
ilens
=
paddle
.
shape
(
x
)[
0
:
1
]
xs
=
x
.
unsqueeze
(
0
)
...
...
paddlespeech/t2s/modules/nets_utils.py
浏览文件 @
17f2944a
...
...
@@ -181,7 +181,7 @@ def make_pad_mask(lengths, xs=None, length_dim=-1):
if
length_dim
==
0
:
raise
ValueError
(
"length_dim cannot be 0: {}"
.
format
(
length_dim
))
bs
=
paddle
.
shape
(
lengths
)
[
0
]
bs
=
paddle
.
shape
(
lengths
)
if
xs
is
None
:
maxlen
=
paddle
.
cast
(
lengths
.
max
(),
dtype
=
bs
.
dtype
)
else
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录