Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
318edec3
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看板
未验证
提交
318edec3
编写于
3月 30, 2022
作者:
小湉湉
提交者:
GitHub
3月 30, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1613 from yt605155624/restructure_expand
[tts]restructure expand in length_regulator.py for paddle2onnx, test=tts
上级
943d4ac1
e52fc08c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
10 deletion
+18
-10
examples/csmsc/tts3/README.md
examples/csmsc/tts3/README.md
+3
-1
paddlespeech/t2s/modules/predictor/length_regulator.py
paddlespeech/t2s/modules/predictor/length_regulator.py
+15
-9
未找到文件。
examples/csmsc/tts3/README.md
浏览文件 @
318edec3
...
@@ -227,7 +227,9 @@ Pretrained FastSpeech2 model with no silence in the edge of audios:
...
@@ -227,7 +227,9 @@ Pretrained FastSpeech2 model with no silence in the edge of audios:
-
[
fastspeech2_nosil_baker_ckpt_0.4.zip
](
https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_nosil_baker_ckpt_0.4.zip
)
-
[
fastspeech2_nosil_baker_ckpt_0.4.zip
](
https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_nosil_baker_ckpt_0.4.zip
)
-
[
fastspeech2_conformer_baker_ckpt_0.5.zip
](
https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_conformer_baker_ckpt_0.5.zip
)
-
[
fastspeech2_conformer_baker_ckpt_0.5.zip
](
https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_conformer_baker_ckpt_0.5.zip
)
The static model can be downloaded here
[
fastspeech2_nosil_baker_static_0.4.zip
](
https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_nosil_baker_static_0.4.zip
)
.
The static model can be downloaded here:
-
[
fastspeech2_nosil_baker_static_0.4.zip
](
https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_nosil_baker_static_0.4.zip
)
-
[
fastspeech2_csmsc_static_0.2.0.zip
](
https://paddlespeech.bj.bcebos.com/Parakeet/released_models/fastspeech2/fastspeech2_csmsc_static_0.2.0.zip
)
Model | Step | eval/loss | eval/l1_loss | eval/duration_loss | eval/pitch_loss| eval/energy_loss
Model | Step | eval/loss | eval/l1_loss | eval/duration_loss | eval/pitch_loss| eval/energy_loss
:-------------:| :------------:| :-----: | :-----: | :--------: |:--------:|:---------:
:-------------:| :------------:| :-----: | :-----: | :--------: |:--------:|:---------:
...
...
paddlespeech/t2s/modules/predictor/length_regulator.py
浏览文件 @
318edec3
...
@@ -73,15 +73,21 @@ class LengthRegulator(nn.Layer):
...
@@ -73,15 +73,21 @@ class LengthRegulator(nn.Layer):
batch_size
,
t_enc
=
paddle
.
shape
(
durations
)
batch_size
,
t_enc
=
paddle
.
shape
(
durations
)
slens
=
paddle
.
sum
(
durations
,
-
1
)
slens
=
paddle
.
sum
(
durations
,
-
1
)
t_dec
=
paddle
.
max
(
slens
)
t_dec
=
paddle
.
max
(
slens
)
M
=
paddle
.
zeros
([
batch_size
,
t_dec
,
t_enc
])
t_dec_1
=
t_dec
+
1
for
i
in
range
(
batch_size
):
flatten_duration
=
paddle
.
cumsum
(
k
=
0
paddle
.
reshape
(
durations
,
[
batch_size
*
t_enc
]))
+
1
for
j
in
range
(
t_enc
):
init
=
paddle
.
zeros
(
t_dec_1
)
d
=
durations
[
i
,
j
]
m_batch
=
batch_size
*
t_enc
# If the d == 0, slice action is meaningless and not supported in paddle
M
=
paddle
.
zeros
([
t_dec_1
,
m_batch
])
if
d
>=
1
:
for
i
in
range
(
m_batch
):
M
[
i
,
k
:
k
+
d
,
j
]
=
1
d
=
flatten_duration
[
i
]
k
+=
d
m
=
paddle
.
concat
(
[
paddle
.
ones
(
d
),
paddle
.
zeros
(
t_dec_1
-
d
)],
axis
=
0
)
M
[:,
i
]
=
m
-
init
init
=
m
M
=
paddle
.
reshape
(
M
,
shape
=
[
t_dec_1
,
batch_size
,
t_enc
])
M
=
M
[
1
:,
:,
:]
M
=
paddle
.
transpose
(
M
,
(
1
,
0
,
2
))
encodings
=
paddle
.
matmul
(
M
,
encodings
)
encodings
=
paddle
.
matmul
(
M
,
encodings
)
return
encodings
return
encodings
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录