mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
update speaker id casting for glow-tts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user