Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Parakeet
提交
9dad6c3d
P
Parakeet
项目概览
PaddlePaddle
/
Parakeet
通知
8
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Parakeet
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9dad6c3d
编写于
6月 12, 2020
作者:
C
chenfeiyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix synthesis for transformerTTS and FastSpeech, use int64 explicitly
上级
b7c584e2
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
5 deletion
+7
-5
examples/fastspeech/synthesis.py
examples/fastspeech/synthesis.py
+2
-2
examples/transformer_tts/synthesis.py
examples/transformer_tts/synthesis.py
+5
-3
未找到文件。
examples/fastspeech/synthesis.py
浏览文件 @
9dad6c3d
...
@@ -83,8 +83,8 @@ def synthesis(text_input, args):
...
@@ -83,8 +83,8 @@ def synthesis(text_input, args):
pos_text
=
np
.
arange
(
1
,
text
.
shape
[
1
]
+
1
)
pos_text
=
np
.
arange
(
1
,
text
.
shape
[
1
]
+
1
)
pos_text
=
np
.
expand_dims
(
pos_text
,
axis
=
0
)
pos_text
=
np
.
expand_dims
(
pos_text
,
axis
=
0
)
text
=
dg
.
to_variable
(
text
)
text
=
dg
.
to_variable
(
text
)
.
astype
(
np
.
int64
)
pos_text
=
dg
.
to_variable
(
pos_text
)
pos_text
=
dg
.
to_variable
(
pos_text
)
.
astype
(
np
.
int64
)
_
,
mel_output_postnet
=
model
(
text
,
pos_text
,
alpha
=
args
.
alpha
)
_
,
mel_output_postnet
=
model
(
text
,
pos_text
,
alpha
=
args
.
alpha
)
...
...
examples/transformer_tts/synthesis.py
浏览文件 @
9dad6c3d
...
@@ -92,15 +92,17 @@ def synthesis(text_input, args):
...
@@ -92,15 +92,17 @@ def synthesis(text_input, args):
model_vocoder
.
eval
()
model_vocoder
.
eval
()
# init input
# init input
text
=
np
.
asarray
(
text_to_sequence
(
text_input
))
text
=
np
.
asarray
(
text_to_sequence
(
text_input
))
text
=
fluid
.
layers
.
unsqueeze
(
dg
.
to_variable
(
text
),
[
0
])
text
=
fluid
.
layers
.
unsqueeze
(
dg
.
to_variable
(
text
)
.
astype
(
np
.
int64
)
,
[
0
])
mel_input
=
dg
.
to_variable
(
np
.
zeros
([
1
,
1
,
80
])).
astype
(
np
.
float32
)
mel_input
=
dg
.
to_variable
(
np
.
zeros
([
1
,
1
,
80
])).
astype
(
np
.
float32
)
pos_text
=
np
.
arange
(
1
,
text
.
shape
[
1
]
+
1
)
pos_text
=
np
.
arange
(
1
,
text
.
shape
[
1
]
+
1
)
pos_text
=
fluid
.
layers
.
unsqueeze
(
dg
.
to_variable
(
pos_text
),
[
0
])
pos_text
=
fluid
.
layers
.
unsqueeze
(
dg
.
to_variable
(
pos_text
).
astype
(
np
.
int64
),
[
0
])
pbar
=
tqdm
(
range
(
args
.
max_len
))
pbar
=
tqdm
(
range
(
args
.
max_len
))
for
i
in
pbar
:
for
i
in
pbar
:
pos_mel
=
np
.
arange
(
1
,
mel_input
.
shape
[
1
]
+
1
)
pos_mel
=
np
.
arange
(
1
,
mel_input
.
shape
[
1
]
+
1
)
pos_mel
=
fluid
.
layers
.
unsqueeze
(
dg
.
to_variable
(
pos_mel
),
[
0
])
pos_mel
=
fluid
.
layers
.
unsqueeze
(
dg
.
to_variable
(
pos_mel
).
astype
(
np
.
int64
),
[
0
])
mel_pred
,
postnet_pred
,
attn_probs
,
stop_preds
,
attn_enc
,
attn_dec
=
model
(
mel_pred
,
postnet_pred
,
attn_probs
,
stop_preds
,
attn_enc
,
attn_dec
=
model
(
text
,
mel_input
,
pos_text
,
pos_mel
)
text
,
mel_input
,
pos_text
,
pos_mel
)
mel_input
=
fluid
.
layers
.
concat
(
mel_input
=
fluid
.
layers
.
concat
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录