Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
512f20d0
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看板
提交
512f20d0
编写于
9月 21, 2022
作者:
I
iftaken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed get_cmd and use MAIN_ROOT in ge2e
上级
6a575218
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
60 addition
and
37 deletion
+60
-37
demos/speech_web/speech_server/src/ernie_sat.py
demos/speech_web/speech_server/src/ernie_sat.py
+58
-33
demos/speech_web/speech_server/src/ge2e_clone.py
demos/speech_web/speech_server/src/ge2e_clone.py
+2
-4
未找到文件。
demos/speech_web/speech_server/src/ernie_sat.py
浏览文件 @
512f20d0
...
@@ -52,19 +52,19 @@ class SAT:
...
@@ -52,19 +52,19 @@ class SAT:
voc_stat
=
os
.
path
.
join
(
self
.
zh_voc_model_path
,
"feats_stats.npy"
)
voc_stat
=
os
.
path
.
join
(
self
.
zh_voc_model_path
,
"feats_stats.npy"
)
cmd
=
self
.
get_cmd
(
cmd
=
self
.
get_cmd
(
task_name
,
task_name
=
task_name
,
input_name
,
input_name
=
input_name
,
old_str
,
old_str
=
old_str
,
new_str
,
new_str
=
new_str
,
config_path
,
config_path
=
config_path
,
phones_dict
,
phones_dict
=
phones_dict
,
erniesat_ckpt
,
erniesat_ckpt
=
erniesat_ckpt
,
erniesat_stat
,
erniesat_stat
=
erniesat_stat
,
voc
,
voc
=
voc
,
voc_config
,
voc_config
=
voc_config
,
voc_ckpt
,
voc_ckpt
=
voc_ckpt
,
voc_stat
,
voc_stat
=
voc_stat
,
output_name
,
output_name
=
output_name
,
source_lang
=
"zh"
,
source_lang
=
"zh"
,
target_lang
=
"zh"
)
target_lang
=
"zh"
)
...
@@ -94,10 +94,22 @@ class SAT:
...
@@ -94,10 +94,22 @@ class SAT:
"snapshot_iter_2500000.pdz"
)
"snapshot_iter_2500000.pdz"
)
voc_stat
=
os
.
path
.
join
(
self
.
cross_voc_model_path
,
"feats_stats.npy"
)
voc_stat
=
os
.
path
.
join
(
self
.
cross_voc_model_path
,
"feats_stats.npy"
)
task_name
=
"synthesize"
task_name
=
"synthesize"
cmd
=
self
.
get_cmd
(
task_name
,
input_name
,
old_str
,
new_str
,
config_path
,
cmd
=
self
.
get_cmd
(
phones_dict
,
erniesat_ckpt
,
erniesat_stat
,
voc
,
task_name
=
task_name
,
voc_config
,
voc_ckpt
,
voc_stat
,
output_name
,
input_name
=
input_name
,
source_lang
,
target_lang
)
old_str
=
old_str
,
new_str
=
new_str
,
config_path
=
config_path
,
phones_dict
=
phones_dict
,
erniesat_ckpt
=
erniesat_ckpt
,
erniesat_stat
=
erniesat_stat
,
voc
=
voc
,
voc_config
=
voc_config
,
voc_ckpt
=
voc_ckpt
,
voc_stat
=
voc_stat
,
output_name
=
output_name
,
source_lang
=
source_lang
,
target_lang
=
target_lang
)
return
run_cmd
(
cmd
,
output_name
)
return
run_cmd
(
cmd
,
output_name
)
...
@@ -125,27 +137,40 @@ class SAT:
...
@@ -125,27 +137,40 @@ class SAT:
voc_stat
=
os
.
path
.
join
(
self
.
zh_voc_model_path
,
"feats_stats.npy"
)
voc_stat
=
os
.
path
.
join
(
self
.
zh_voc_model_path
,
"feats_stats.npy"
)
cmd
=
self
.
get_cmd
(
cmd
=
self
.
get_cmd
(
task_name
,
task_name
=
task_name
,
input_name
,
input_name
=
input_name
,
old_str
,
old_str
=
old_str
,
new_str
,
new_str
=
new_str
,
config_path
,
config_path
=
config_path
,
phones_dict
,
phones_dict
=
phones_dict
,
erniesat_ckpt
,
erniesat_ckpt
=
erniesat_ckpt
,
erniesat_stat
,
erniesat_stat
=
erniesat_stat
,
voc
,
voc
=
voc
,
voc_config
,
voc_config
=
voc_config
,
voc_ckpt
,
voc_ckpt
=
voc_ckpt
,
voc_stat
,
voc_stat
=
voc_stat
,
output_name
,
output_name
=
output_name
,
source_lang
=
"en"
,
source_lang
=
"en"
,
target_lang
=
"en"
)
target_lang
=
"en"
)
return
run_cmd
(
cmd
,
output_name
)
return
run_cmd
(
cmd
,
output_name
)
def
get_cmd
(
self
,
task_name
,
input_name
,
old_str
,
new_str
,
config_path
,
def
get_cmd
(
self
,
phones_dict
,
erniesat_ckpt
,
erniesat_stat
,
voc
,
voc_config
,
task_name
:
str
,
voc_ckpt
,
voc_stat
,
output_name
,
source_lang
,
target_lang
):
input_name
:
str
,
old_str
:
str
,
new_str
:
str
,
config_path
:
str
,
phones_dict
:
str
,
erniesat_ckpt
:
str
,
erniesat_stat
:
str
,
voc
:
str
,
voc_config
:
str
,
voc_ckpt
:
str
,
voc_stat
:
str
,
output_name
:
str
,
source_lang
:
str
,
target_lang
:
str
):
cmd
=
f
"""
cmd
=
f
"""
FLAGS_allocator_strategy=naive_best_fit
\
FLAGS_allocator_strategy=naive_best_fit
\
FLAGS_fraction_of_gpu_memory_to_use=0.01
\
FLAGS_fraction_of_gpu_memory_to_use=0.01
\
...
...
demos/speech_web/speech_server/src/ge2e_clone.py
浏览文件 @
512f20d0
import
os
import
os
import
shutil
import
shutil
from
.util
import
MAIN_ROOT
from
.util
import
run_cmd
from
.util
import
run_cmd
class
VoiceCloneGE2E
():
class
VoiceCloneGE2E
():
def
__init__
(
self
):
def
__init__
(
self
):
# Path 到指定路径上
# Path 到指定路径上
self
.
now_file_path
=
os
.
path
.
dirname
(
__file__
)
self
.
BIN_DIR
=
os
.
path
.
join
(
MAIN_ROOT
,
"paddlespeech/t2s/exps"
)
self
.
BIN_DIR
=
os
.
path
.
realpath
(
os
.
path
.
join
(
self
.
now_file_path
,
"../../../../paddlespeech/t2s/exps"
))
# am
# am
self
.
am
=
"fastspeech2_aishell3"
self
.
am
=
"fastspeech2_aishell3"
self
.
am_config
=
"source/model/fastspeech2_nosil_aishell3_vc1_ckpt_0.5/default.yaml"
self
.
am_config
=
"source/model/fastspeech2_nosil_aishell3_vc1_ckpt_0.5/default.yaml"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录