Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Parakeet
提交
8b051486
P
Parakeet
项目概览
PaddlePaddle
/
Parakeet
通知
11
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看板
提交
8b051486
编写于
2月 24, 2020
作者:
L
liuyibing01
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update synthesis script for waveflow
上级
7635493a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
8 deletion
+8
-8
examples/waveflow/synthesis.py
examples/waveflow/synthesis.py
+6
-6
examples/waveflow/utils.py
examples/waveflow/utils.py
+0
-1
parakeet/models/waveflow/waveflow.py
parakeet/models/waveflow/waveflow.py
+2
-1
未找到文件。
examples/waveflow/synthesis.py
浏览文件 @
8b051486
...
...
@@ -2,13 +2,13 @@ import os
import
random
from
pprint
import
pprint
import
json
argparse
import
argparse
import
numpy
as
np
import
paddle.fluid.dygraph
as
dg
from
paddle
import
fluid
import
utils
from
waveflow
import
WaveFlow
from
parakeet.models.
waveflow
import
WaveFlow
def
add_options_to_parser
(
parser
):
...
...
@@ -53,7 +53,7 @@ def add_options_to_parser(parser):
def
synthesize
(
config
):
pprint
(
jsonargparse
.
namespace_to_dict
(
config
))
pprint
(
vars
(
config
))
# Get checkpoint directory path.
run_dir
=
os
.
path
.
join
(
"runs"
,
config
.
model
,
config
.
name
)
...
...
@@ -90,9 +90,8 @@ def synthesize(config):
if
__name__
==
"__main__"
:
# Create parser.
parser
=
jsonargparse
.
ArgumentParser
(
description
=
"Synthesize audio using WaveNet model"
,
formatter_class
=
'default_argparse'
)
parser
=
argparse
.
ArgumentParser
(
description
=
"Synthesize audio using WaveNet model"
)
add_options_to_parser
(
parser
)
utils
.
add_config_options_to_parser
(
parser
)
...
...
@@ -100,4 +99,5 @@ if __name__ == "__main__":
# For conflicting updates to the same field,
# the preceding update will be overwritten by the following one.
config
=
parser
.
parse_args
()
config
=
utils
.
add_yaml_config
(
config
)
synthesize
(
config
)
examples/waveflow/utils.py
浏览文件 @
8b051486
...
...
@@ -84,7 +84,6 @@ def add_config_options_to_parser(parser):
def
add_yaml_config
(
config
):
print
(
config
)
with
open
(
config
.
config
,
'rt'
)
as
f
:
yaml_cfg
=
ruamel
.
yaml
.
safe_load
(
f
)
cfg_vars
=
vars
(
config
)
...
...
parakeet/models/waveflow/waveflow.py
浏览文件 @
8b051486
...
...
@@ -152,7 +152,8 @@ class WaveFlow():
sample
=
config
.
sample
output
=
"{}/{}/iter-{}"
.
format
(
config
.
output
,
config
.
name
,
iteration
)
os
.
makedirs
(
output
,
exist_ok
=
True
)
if
not
os
.
path
.
exists
(
output
):
os
.
makedirs
(
output
)
mels_list
=
[
mels
for
_
,
mels
in
self
.
validloader
()]
if
sample
is
not
None
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录