提交 4d867700 编写于 作者: H Hui Zhang

move ssl into t2s.frontend; fix spk_id for 0-D tensor;

上级 558cfc72
......@@ -18,6 +18,5 @@ from . import exps
from . import frontend
from . import models
from . import modules
from . import ssml
from . import training
from . import utils
......@@ -148,7 +148,7 @@ def evaluate(args):
# multi speaker
if am_dataset in {"aishell3", "vctk", "mix", "canton"}:
# multi-speaker
spk_id = paddle.to_tensor(args.spk_id)
spk_id = paddle.to_tensor([args.spk_id])
mel = am_inference(part_phone_ids, spk_id)
else:
# single-speaker
......@@ -157,7 +157,7 @@ def evaluate(args):
part_tone_ids = frontend_dict['tone_ids'][i]
if am_dataset in {"aishell3", "vctk", "mix"}:
# multi-speaker
spk_id = paddle.to_tensor(args.spk_id)
spk_id = paddle.to_tensor([args.spk_id])
mel = am_inference(part_phone_ids, part_tone_ids,
spk_id)
else:
......
......@@ -15,6 +15,7 @@ from .generate_lexicon import *
from .normalizer import *
from .phonectic import *
from .punctuation import *
from .ssml import *
from .tone_sandhi import *
from .vocab import *
from .zh_normalization import *
......@@ -19,8 +19,8 @@ import numpy as np
import paddle
from paddlespeech.t2s.frontend import English
from paddlespeech.t2s.frontend.ssml.xml_processor import MixTextProcessor
from paddlespeech.t2s.frontend.zh_frontend import Frontend
from paddlespeech.t2s.ssml.xml_processor import MixTextProcessor
class MixFrontend():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册