mirror of https://github.com/coqui-ai/TTS.git
Update `synthesis` for the new API
This commit is contained in:
parent
4e83bf3968
commit
d8ec7086b6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue