Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mrywhh
Real-Time-Voice-Cloning
提交
652586f4
R
Real-Time-Voice-Cloning
项目概览
mrywhh
/
Real-Time-Voice-Cloning
落后 Fork 源项目 12 个版本
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Real-Time-Voice-Cloning
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
652586f4
编写于
6月 21, 2019
作者:
C
Corentin Jemine
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The toolbox now can handle 0 arguments
上级
0908e4d3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
10 deletion
+17
-10
demo_toolbox.py
demo_toolbox.py
+3
-2
toolbox/ui.py
toolbox/ui.py
+14
-8
未找到文件。
demo_toolbox.py
浏览文件 @
652586f4
...
...
@@ -10,11 +10,12 @@ if __name__ == '__main__':
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
)
parser
.
add_argument
(
"datasets_root"
,
type
=
Path
,
help
=
\
parser
.
add_argument
(
"
-d"
,
"--
datasets_root"
,
type
=
Path
,
help
=
\
"Path to the directory containing your datasets. See toolbox/__init__.py for a list of "
"supported datasets. You can add your own data by created a directory named UserAudio "
"in your datasets root. Supported formats are mp3, flac, wav and m4a. Each speaker should "
"be inside a directory, e.g. <datasets_root>/UserAudio/speaker_01/audio_01.wav."
)
"be inside a directory, e.g. <datasets_root>/UserAudio/speaker_01/audio_01.wav."
,
default
=
None
)
parser
.
add_argument
(
"-e"
,
"--enc_models_dir"
,
type
=
Path
,
default
=
"encoder/saved_models"
,
help
=
"Directory containing saved encoder models"
)
parser
.
add_argument
(
"-s"
,
"--syn_models_dir"
,
type
=
Path
,
default
=
"synthesizer/saved_models"
,
...
...
toolbox/ui.py
浏览文件 @
652586f4
...
...
@@ -210,14 +210,20 @@ class UI(QDialog):
random
=
True
):
# Select a random dataset
if
level
<=
0
:
datasets
=
[
datasets_root
.
joinpath
(
d
)
for
d
in
recognized_datasets
]
datasets
=
[
d
.
relative_to
(
datasets_root
)
for
d
in
datasets
if
d
.
exists
()]
self
.
browser_load_button
.
setDisabled
(
len
(
datasets
)
==
0
)
if
len
(
datasets
)
==
0
:
print
(
"Warning: you do not have any of the recognized datasets in %s.
\n
"
"The recognized datasets are:
\n\t
%s
\n
Feel free to add your own. You can "
"still use the toolbox by recording samples yourself."
%
(
datasets_root
,
"
\n\t
"
.
join
(
recognized_datasets
)),
file
=
sys
.
stderr
)
if
datasets_root
is
not
None
:
datasets
=
[
datasets_root
.
joinpath
(
d
)
for
d
in
recognized_datasets
]
datasets
=
[
d
.
relative_to
(
datasets_root
)
for
d
in
datasets
if
d
.
exists
()]
self
.
browser_load_button
.
setDisabled
(
len
(
datasets
)
==
0
)
if
datasets_root
is
None
or
len
(
datasets
)
==
0
:
# Yes I am proud of this two-liner
msg
=
"Warning: you d"
+
"id not pass a root directory for datasets as argument"
\
if
datasets_root
is
None
else
"o not have any of the recognized datasets in %s"
self
.
log
(
msg
)
msg
+=
".
\n
The recognized datasets are:
\n\t
%s
\n
Feel free to add your own. You "
\
"can still use the toolbox by recording samples yourself."
%
\
(
"
\n\t
"
.
join
(
recognized_datasets
))
print
(
msg
,
file
=
sys
.
stderr
)
self
.
random_utterance_button
.
setDisabled
(
True
)
self
.
random_speaker_button
.
setDisabled
(
True
)
self
.
random_dataset_button
.
setDisabled
(
True
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录