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

pull/3316/head
Hui Zhang 2 years ago
parent 558cfc7233
commit 4d867700eb

@ -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():

Loading…
Cancel
Save