use MAIN_ROOT and delete png

pull/2412/head
iftaken 2 years ago
parent d5d94cbd6c
commit 7f862b0d67

@ -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
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 使用上有差异
### 开启前端服务

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

@ -1,5 +1,6 @@
import os
from .util import MAIN_ROOT
from .util import run_cmd
@ -20,10 +21,8 @@ class SAT:
self.cross_voc_model_path = os.path.realpath(
"source/model/hifigan_aishell3_ckpt_0.2.0")
self.now_file_path = os.path.dirname(__file__)
self.BIN_DIR = os.path.realpath(
os.path.join(self.now_file_path,
"../../../../paddlespeech/t2s/exps/ernie_sat"))
self.BIN_DIR = os.path.join(MAIN_ROOT,
"paddlespeech/t2s/exps/ernie_sat")
def zh_synthesize_edit(self,
old_str: str,
@ -37,11 +36,6 @@ class SAT:
print("task name only in ['edit', 'synthesize']")
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")
phones_dict = os.path.join(self.zh_pretrain_model_path,
@ -84,9 +78,6 @@ class SAT:
source_lang: str,
target_lang: str,
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,
"default.yaml")
@ -117,9 +108,6 @@ class SAT:
output_name: os.PathLike,
task_name: str="synthesize",
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")

@ -1,5 +1,6 @@
import os
from .util import MAIN_ROOT
from .util import run_cmd
@ -17,12 +18,10 @@ def find_max_ckpt(model_path):
class FineTune:
def __init__(self):
self.now_file_path = os.path.dirname(__file__)
self.PYTHONPATH = os.path.realpath(
os.path.join(self.now_file_path,
"../../../../examples/other/tts_finetune/tts3"))
self.BIN_DIR = os.path.realpath(
os.path.join(self.now_file_path,
"../../../../paddlespeech/t2s/exps/fastspeech2"))
self.PYTHONPATH = os.path.join(MAIN_ROOT,
"examples/other/tts_finetune/tts3")
self.BIN_DIR = os.path.join(MAIN_ROOT,
"paddlespeech/t2s/exps/fastspeech2")
self.pretrained_model_dir = os.path.realpath(
"source/model/fastspeech2_aishell3_ckpt_1.1.0")
self.voc_model_dir = os.path.realpath(

@ -1,16 +1,14 @@
import os
import shutil
from .util import MAIN_ROOT
from .util import run_cmd
class VoiceCloneTDNN():
def __init__(self):
# Path 到指定路径上
self.now_file_path = os.path.dirname(__file__)
self.BIN_DIR = os.path.realpath(
os.path.join(self.now_file_path,
"../../../../paddlespeech/t2s/exps"))
self.BIN_DIR = os.path.join(MAIN_ROOT, "paddlespeech/t2s/exps")
self.am = "fastspeech2_aishell3"
self.am_config = "source/model/fastspeech2_aishell3_ckpt_vc2_1.2.0/default.yaml"

@ -2,6 +2,9 @@ import os
import random
import subprocess
NOW_FILE_PATH = os.path.dirname(__file__)
MAIN_ROOT = os.path.realpath(os.path.join(NOW_FILE_PATH, "../../../../"))
def randName(n=5):
return "".join(random.sample('zyxwvutsrqponmlkjihgfedcba', n))

Loading…
Cancel
Save