From 4d867700ebca854fd1d375f98a5919aa7f5227ea Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Wed, 7 Jun 2023 07:49:38 +0000 Subject: [PATCH] move ssl into t2s.frontend; fix spk_id for 0-D tensor; --- paddlespeech/t2s/__init__.py | 1 - paddlespeech/t2s/exps/synthesize_e2e.py | 4 ++-- paddlespeech/t2s/frontend/__init__.py | 1 + paddlespeech/t2s/frontend/mix_frontend.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/paddlespeech/t2s/__init__.py b/paddlespeech/t2s/__init__.py index 57fe82a9..7d93c026 100644 --- a/paddlespeech/t2s/__init__.py +++ b/paddlespeech/t2s/__init__.py @@ -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 diff --git a/paddlespeech/t2s/exps/synthesize_e2e.py b/paddlespeech/t2s/exps/synthesize_e2e.py index bff329a4..f7821384 100644 --- a/paddlespeech/t2s/exps/synthesize_e2e.py +++ b/paddlespeech/t2s/exps/synthesize_e2e.py @@ -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: diff --git a/paddlespeech/t2s/frontend/__init__.py b/paddlespeech/t2s/frontend/__init__.py index 64015435..09caa1be 100644 --- a/paddlespeech/t2s/frontend/__init__.py +++ b/paddlespeech/t2s/frontend/__init__.py @@ -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 * diff --git a/paddlespeech/t2s/frontend/mix_frontend.py b/paddlespeech/t2s/frontend/mix_frontend.py index b8c16097..fb7ea94e 100644 --- a/paddlespeech/t2s/frontend/mix_frontend.py +++ b/paddlespeech/t2s/frontend/mix_frontend.py @@ -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(): -- GitLab