mirror of https://github.com/coqui-ai/TTS.git
update speaker id casting for glow-tts
This commit is contained in:
parent
999120ecdf
commit
639fa29261
|
@ -149,7 +149,8 @@ def inv_spectrogram(postnet_output, ap, CONFIG):
|
||||||
def id_to_torch(speaker_id, cuda=False):
|
def id_to_torch(speaker_id, cuda=False):
|
||||||
if speaker_id is not None:
|
if speaker_id is not None:
|
||||||
speaker_id = np.asarray(speaker_id)
|
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:
|
if cuda:
|
||||||
return speaker_id.cuda()
|
return speaker_id.cuda()
|
||||||
return speaker_id
|
return speaker_id
|
||||||
|
|
Loading…
Reference in New Issue