From 639fa292616db7aa740088f5e06094cd35d5ba1a Mon Sep 17 00:00:00 2001 From: erogol Date: Mon, 14 Dec 2020 16:58:47 +0100 Subject: [PATCH] update speaker id casting for glow-tts --- TTS/tts/utils/synthesis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TTS/tts/utils/synthesis.py b/TTS/tts/utils/synthesis.py index 76fdb3de..d75ac64b 100644 --- a/TTS/tts/utils/synthesis.py +++ b/TTS/tts/utils/synthesis.py @@ -149,7 +149,8 @@ def inv_spectrogram(postnet_output, ap, CONFIG): def id_to_torch(speaker_id, cuda=False): if speaker_id is not None: speaker_id = np.asarray(speaker_id) - speaker_id = torch.from_numpy(speaker_id).unsqueeze(0) + # TODO: test this for tacotron models + speaker_id = torch.from_numpy(speaker_id) if cuda: return speaker_id.cuda() return speaker_id