Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
67ec6242
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看板
提交
67ec6242
编写于
2月 16, 2022
作者:
小湉湉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix ci for waveflow, test=tts
上级
f5109761
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
6 deletion
+6
-6
paddlespeech/t2s/frontend/zh_normalization/num.py
paddlespeech/t2s/frontend/zh_normalization/num.py
+1
-1
paddlespeech/t2s/models/waveflow.py
paddlespeech/t2s/models/waveflow.py
+5
-5
未找到文件。
paddlespeech/t2s/frontend/zh_normalization/num.py
浏览文件 @
67ec6242
...
@@ -208,7 +208,7 @@ def verbalize_digit(value_string: str, alt_one=False) -> str:
...
@@ -208,7 +208,7 @@ def verbalize_digit(value_string: str, alt_one=False) -> str:
result_symbols
=
[
DIGITS
[
digit
]
for
digit
in
value_string
]
result_symbols
=
[
DIGITS
[
digit
]
for
digit
in
value_string
]
result
=
''
.
join
(
result_symbols
)
result
=
''
.
join
(
result_symbols
)
if
alt_one
:
if
alt_one
:
result
.
replace
(
"一"
,
"幺"
)
result
=
result
.
replace
(
"一"
,
"幺"
)
return
result
return
result
...
...
paddlespeech/t2s/models/waveflow.py
浏览文件 @
67ec6242
...
@@ -33,11 +33,11 @@ def fold(x, n_group):
...
@@ -33,11 +33,11 @@ def fold(x, n_group):
"""Fold audio or spectrogram's temporal dimension in to groups.
"""Fold audio or spectrogram's temporal dimension in to groups.
Args:
Args:
x(Tensor): The input tensor. shape=(
\
*, time_steps)
x(Tensor): The input tensor. shape=(*, time_steps)
n_group(int): The size of a group.
n_group(int): The size of a group.
Returns:
Returns:
Tensor: Folded tensor. shape=(
\
*, time_steps // n_group, group)
Tensor: Folded tensor. shape=(*, time_steps // n_group, group)
"""
"""
spatial_shape
=
list
(
x
.
shape
[:
-
1
])
spatial_shape
=
list
(
x
.
shape
[:
-
1
])
time_steps
=
paddle
.
shape
(
x
)[
-
1
]
time_steps
=
paddle
.
shape
(
x
)[
-
1
]
...
@@ -98,11 +98,11 @@ class UpsampleNet(nn.LayerList):
...
@@ -98,11 +98,11 @@ class UpsampleNet(nn.LayerList):
trim_conv_artifact(bool, optional, optional): Trim deconvolution artifact at each layer. Defaults to False.
trim_conv_artifact(bool, optional, optional): Trim deconvolution artifact at each layer. Defaults to False.
Returns:
Returns:
Tensor: The upsampled spectrogram. shape=(batch_size, input_channels, time_steps
\
* upsample_factor)
Tensor: The upsampled spectrogram. shape=(batch_size, input_channels, time_steps * upsample_factor)
Notes:
Notes:
If trim_conv_artifact is ``True``, the output time steps is less
If trim_conv_artifact is ``True``, the output time steps is less
than ``time_steps
\
* upsample_factors``.
than ``time_steps * upsample_factors``.
"""
"""
x
=
paddle
.
unsqueeze
(
x
,
1
)
# (B, C, T) -> (B, 1, C, T)
x
=
paddle
.
unsqueeze
(
x
,
1
)
# (B, C, T) -> (B, 1, C, T)
for
layer
in
self
:
for
layer
in
self
:
...
@@ -641,7 +641,7 @@ class ConditionalWaveFlow(nn.LayerList):
...
@@ -641,7 +641,7 @@ class ConditionalWaveFlow(nn.LayerList):
mel(np.ndarray): Mel spectrogram of an utterance(in log-magnitude). shape=(C_mel, T_mel)
mel(np.ndarray): Mel spectrogram of an utterance(in log-magnitude). shape=(C_mel, T_mel)
Returns:
Returns:
Tensor: The synthesized audio, where``T <= T_mel
\
* upsample_factors``. shape=(B, T)
Tensor: The synthesized audio, where``T <= T_mel * upsample_factors``. shape=(B, T)
"""
"""
start
=
time
.
time
()
start
=
time
.
time
()
condition
=
self
.
encoder
(
mel
,
trim_conv_artifact
=
True
)
# (B, C, T)
condition
=
self
.
encoder
(
mel
,
trim_conv_artifact
=
True
)
# (B, C, T)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录