From ee4d55549dc866eb90372d26e3eaeee1ef68acdf Mon Sep 17 00:00:00 2001 From: Thomas Werkmeister Date: Wed, 17 Jul 2019 14:08:53 +0200 Subject: [PATCH] check for speaker id is None before put on cuda --- utils/synthesis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/synthesis.py b/utils/synthesis.py index c782b4c1..541ee717 100644 --- a/utils/synthesis.py +++ b/utils/synthesis.py @@ -108,7 +108,7 @@ def synthesis(model, # preprocess the given text inputs = text_to_seqvec(text, CONFIG, use_cuda) speaker_id = id_to_torch(speaker_id) - if use_cuda: + if speaker_id is not None and use_cuda: speaker_id = speaker_id.cuda() # synthesize voice decoder_output, postnet_output, alignments, stop_tokens = run_model(