Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
7f862b0d
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看板
“cf6b65a10b50fb400297bd9044e6e21e4827260f”上不存在“paddle/fluid/lite/operators/sequence_reshape_op.h”
提交
7f862b0d
编写于
9月 20, 2022
作者:
I
iftaken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use MAIN_ROOT and delete png
上级
d5d94cbd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
27 deletion
+15
-27
demos/speech_web/README.md
demos/speech_web/README.md
+2
-2
demos/speech_web/docs/效果展示.png
demos/speech_web/docs/效果展示.png
+0
-0
demos/speech_web/speech_server/src/ernie_sat.py
demos/speech_web/speech_server/src/ernie_sat.py
+3
-15
demos/speech_web/speech_server/src/finetune.py
demos/speech_web/speech_server/src/finetune.py
+5
-6
demos/speech_web/speech_server/src/tdnn_clone.py
demos/speech_web/speech_server/src/tdnn_clone.py
+2
-4
demos/speech_web/speech_server/src/util.py
demos/speech_web/speech_server/src/util.py
+3
-0
未找到文件。
demos/speech_web/README.md
浏览文件 @
7f862b0d
...
@@ -25,7 +25,7 @@ PaddleSpeechDemo 是一个以 PaddleSpeech 的语音交互功能为主体开发
...
@@ -25,7 +25,7 @@ PaddleSpeechDemo 是一个以 PaddleSpeech 的语音交互功能为主体开发
运行效果:
运行效果:
!
[
效果
](
docs/效果展示
.png
)
!
[
效果
](
https://user-images.githubusercontent.com/30135920/191188766-12e7ca15-f7b4-45f8-9da5-0c0b0bbe5fcb
.png
)
## 安装
## 安装
...
@@ -192,7 +192,7 @@ cd speech_server
...
@@ -192,7 +192,7 @@ cd speech_server
python vc.py --port 8010
python vc.py --port 8010
```
```
>
如果你是其它的系统,可以使用 conda 安装 mfa v2 进行体验,安装请参考 [Montreal Forced Aligner](https://montreal-forced-aligner.readthedocs.io/en/latest/getting_started.html),使用 MFA v2 需要自行配置环境,并修改调用 MFA 相关的代码, mfa v1 与 mfa v2 使用上有差异
如果你是其它的系统,可以使用 conda 安装 mfa v2 进行体验,安装请参考
[
Montreal Forced Aligner
](
https://montreal-forced-aligner.readthedocs.io/en/latest/getting_started.html
)
,使用 MFA v2 需要自行配置环境,并修改调用 MFA 相关的代码, mfa v1 与 mfa v2 使用上有差异
### 开启前端服务
### 开启前端服务
...
...
demos/speech_web/docs/效果展示.png
已删除
100644 → 0
浏览文件 @
d5d94cbd
106.2 KB
demos/speech_web/speech_server/src/ernie_sat.py
浏览文件 @
7f862b0d
import
os
import
os
from
.util
import
MAIN_ROOT
from
.util
import
run_cmd
from
.util
import
run_cmd
...
@@ -20,10 +21,8 @@ class SAT:
...
@@ -20,10 +21,8 @@ class SAT:
self
.
cross_voc_model_path
=
os
.
path
.
realpath
(
self
.
cross_voc_model_path
=
os
.
path
.
realpath
(
"source/model/hifigan_aishell3_ckpt_0.2.0"
)
"source/model/hifigan_aishell3_ckpt_0.2.0"
)
self
.
now_file_path
=
os
.
path
.
dirname
(
__file__
)
self
.
BIN_DIR
=
os
.
path
.
join
(
MAIN_ROOT
,
self
.
BIN_DIR
=
os
.
path
.
realpath
(
"paddlespeech/t2s/exps/ernie_sat"
)
os
.
path
.
join
(
self
.
now_file_path
,
"../../../../paddlespeech/t2s/exps/ernie_sat"
))
def
zh_synthesize_edit
(
self
,
def
zh_synthesize_edit
(
self
,
old_str
:
str
,
old_str
:
str
,
...
@@ -37,11 +36,6 @@ class SAT:
...
@@ -37,11 +36,6 @@ class SAT:
print
(
"task name only in ['edit', 'synthesize']"
)
print
(
"task name only in ['edit', 'synthesize']"
)
return
None
return
None
# 运行时的 PYTHONPATH
PYTHONPATH
=
os
.
path
.
realpath
(
os
.
path
.
join
(
self
.
now_file_path
,
"../../../../examples/aishell3/ernie_sat"
))
# 推理文件配置
# 推理文件配置
config_path
=
os
.
path
.
join
(
self
.
zh_pretrain_model_path
,
"default.yaml"
)
config_path
=
os
.
path
.
join
(
self
.
zh_pretrain_model_path
,
"default.yaml"
)
phones_dict
=
os
.
path
.
join
(
self
.
zh_pretrain_model_path
,
phones_dict
=
os
.
path
.
join
(
self
.
zh_pretrain_model_path
,
...
@@ -84,9 +78,6 @@ class SAT:
...
@@ -84,9 +78,6 @@ class SAT:
source_lang
:
str
,
source_lang
:
str
,
target_lang
:
str
,
target_lang
:
str
,
erniesat_ckpt_name
:
str
=
"snapshot_iter_489000.pdz"
):
erniesat_ckpt_name
:
str
=
"snapshot_iter_489000.pdz"
):
PYTHONPATH
=
os
.
path
.
realpath
(
os
.
path
.
join
(
self
.
now_file_path
,
"../../../../examples/aishell3_vctk/ernie_sat"
))
# 推理文件配置
# 推理文件配置
config_path
=
os
.
path
.
join
(
self
.
cross_pretrain_model_path
,
config_path
=
os
.
path
.
join
(
self
.
cross_pretrain_model_path
,
"default.yaml"
)
"default.yaml"
)
...
@@ -117,9 +108,6 @@ class SAT:
...
@@ -117,9 +108,6 @@ class SAT:
output_name
:
os
.
PathLike
,
output_name
:
os
.
PathLike
,
task_name
:
str
=
"synthesize"
,
task_name
:
str
=
"synthesize"
,
erniesat_ckpt_name
:
str
=
"snapshot_iter_199500.pdz"
):
erniesat_ckpt_name
:
str
=
"snapshot_iter_199500.pdz"
):
PYTHONPATH
=
os
.
path
.
realpath
(
os
.
path
.
join
(
self
.
now_file_path
,
"../../../../examples/vctk/ernie_sat"
))
# 推理文件配置
# 推理文件配置
config_path
=
os
.
path
.
join
(
self
.
en_pretrain_model_path
,
"default.yaml"
)
config_path
=
os
.
path
.
join
(
self
.
en_pretrain_model_path
,
"default.yaml"
)
...
...
demos/speech_web/speech_server/src/finetune.py
浏览文件 @
7f862b0d
import
os
import
os
from
.util
import
MAIN_ROOT
from
.util
import
run_cmd
from
.util
import
run_cmd
...
@@ -17,12 +18,10 @@ def find_max_ckpt(model_path):
...
@@ -17,12 +18,10 @@ def find_max_ckpt(model_path):
class
FineTune
:
class
FineTune
:
def
__init__
(
self
):
def
__init__
(
self
):
self
.
now_file_path
=
os
.
path
.
dirname
(
__file__
)
self
.
now_file_path
=
os
.
path
.
dirname
(
__file__
)
self
.
PYTHONPATH
=
os
.
path
.
realpath
(
self
.
PYTHONPATH
=
os
.
path
.
join
(
MAIN_ROOT
,
os
.
path
.
join
(
self
.
now_file_path
,
"examples/other/tts_finetune/tts3"
)
"../../../../examples/other/tts_finetune/tts3"
))
self
.
BIN_DIR
=
os
.
path
.
join
(
MAIN_ROOT
,
self
.
BIN_DIR
=
os
.
path
.
realpath
(
"paddlespeech/t2s/exps/fastspeech2"
)
os
.
path
.
join
(
self
.
now_file_path
,
"../../../../paddlespeech/t2s/exps/fastspeech2"
))
self
.
pretrained_model_dir
=
os
.
path
.
realpath
(
self
.
pretrained_model_dir
=
os
.
path
.
realpath
(
"source/model/fastspeech2_aishell3_ckpt_1.1.0"
)
"source/model/fastspeech2_aishell3_ckpt_1.1.0"
)
self
.
voc_model_dir
=
os
.
path
.
realpath
(
self
.
voc_model_dir
=
os
.
path
.
realpath
(
...
...
demos/speech_web/speech_server/src/tdnn_clone.py
浏览文件 @
7f862b0d
import
os
import
os
import
shutil
import
shutil
from
.util
import
MAIN_ROOT
from
.util
import
run_cmd
from
.util
import
run_cmd
class
VoiceCloneTDNN
():
class
VoiceCloneTDNN
():
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"
))
self
.
am
=
"fastspeech2_aishell3"
self
.
am
=
"fastspeech2_aishell3"
self
.
am_config
=
"source/model/fastspeech2_aishell3_ckpt_vc2_1.2.0/default.yaml"
self
.
am_config
=
"source/model/fastspeech2_aishell3_ckpt_vc2_1.2.0/default.yaml"
...
...
demos/speech_web/speech_server/src/util.py
浏览文件 @
7f862b0d
...
@@ -2,6 +2,9 @@ import os
...
@@ -2,6 +2,9 @@ import os
import
random
import
random
import
subprocess
import
subprocess
NOW_FILE_PATH
=
os
.
path
.
dirname
(
__file__
)
MAIN_ROOT
=
os
.
path
.
realpath
(
os
.
path
.
join
(
NOW_FILE_PATH
,
"../../../../"
))
def
randName
(
n
=
5
):
def
randName
(
n
=
5
):
return
""
.
join
(
random
.
sample
(
'zyxwvutsrqponmlkjihgfedcba'
,
n
))
return
""
.
join
(
random
.
sample
(
'zyxwvutsrqponmlkjihgfedcba'
,
n
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录