Skip to content

Commit

Permalink
move ssl into t2s.frontend; fix spk_id for 0-D tensor;
Browse files Browse the repository at this point in the history
  • Loading branch information
zh794390558 committed Jun 7, 2023
1 parent 558cfc7 commit 4d86770
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion paddlespeech/t2s/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@
from . import frontend
from . import models
from . import modules
from . import ssml
from . import training
from . import utils
4 changes: 2 additions & 2 deletions paddlespeech/t2s/exps/synthesize_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions paddlespeech/t2s/frontend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from .normalizer import *
from .phonectic import *
from .punctuation import *
from .ssml import *
from .tone_sandhi import *
from .vocab import *
from .zh_normalization import *
2 changes: 1 addition & 1 deletion paddlespeech/t2s/frontend/mix_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
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():
Expand Down

0 comments on commit 4d86770

Please sign in to comment.