From d8ec7086b6fe6490fbe24b391fd3f2f7daa2dbf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Wed, 24 Nov 2021 18:41:21 +0100 Subject: [PATCH] Update `synthesis` for the new API --- TTS/tts/utils/synthesis.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/TTS/tts/utils/synthesis.py b/TTS/tts/utils/synthesis.py index a4f4b0c8..9d9660aa 100644 --- a/TTS/tts/utils/synthesis.py +++ b/TTS/tts/utils/synthesis.py @@ -113,8 +113,6 @@ def synthesis( text, CONFIG, use_cuda, - ap, - tokenizer, speaker_id=None, style_wav=None, use_griffin_lim=False, @@ -139,9 +137,6 @@ def synthesis( use_cuda (bool): Enable/disable CUDA. - ap (TTS.tts.utils.audio.AudioProcessor): - The audio processor for extracting features and pre/post-processing audio. - speaker_id (int): Speaker ID passed to the speaker embedding layer in multi-speaker model. Defaults to None. @@ -169,10 +164,10 @@ def synthesis( if isinstance(style_wav, dict): style_mel = style_wav else: - style_mel = compute_style_mel(style_wav, ap, cuda=use_cuda) + style_mel = compute_style_mel(style_wav, model.ap, cuda=use_cuda) # convert text to sequence of token IDs text_inputs = np.asarray( - tokenizer.text_to_ids(text), + model.tokenizer.text_to_ids(text), dtype=np.int32, ) # pass tensors to backend