From d0eb642d884058baca4b6b7fe2613114893c6ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Tue, 16 Nov 2021 13:34:45 +0100 Subject: [PATCH] Refactor synthesis.py for TTSTokenizer --- TTS/tts/utils/synthesis.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/TTS/tts/utils/synthesis.py b/TTS/tts/utils/synthesis.py index 9d9660aa..7bbc282f 100644 --- a/TTS/tts/utils/synthesis.py +++ b/TTS/tts/utils/synthesis.py @@ -113,6 +113,11 @@ def synthesis( text, CONFIG, use_cuda, +<<<<<<< HEAD +======= + ap, + tokenizer, +>>>>>>> Refactor synthesis.py for TTSTokenizer speaker_id=None, style_wav=None, use_griffin_lim=False, @@ -164,10 +169,10 @@ def synthesis( if isinstance(style_wav, dict): style_mel = style_wav else: - style_mel = compute_style_mel(style_wav, model.ap, cuda=use_cuda) + style_mel = compute_style_mel(style_wav, ap, cuda=use_cuda) # convert text to sequence of token IDs text_inputs = np.asarray( - model.tokenizer.text_to_ids(text), + tokenizer.text_to_ids(text), dtype=np.int32, ) # pass tensors to backend