mirror of https://github.com/coqui-ai/TTS.git
bug fix for multispeaker test run
This commit is contained in:
parent
484bde4971
commit
1468db0d07
2
train.py
2
train.py
|
@ -399,7 +399,7 @@ def evaluate(model, criterion, criterion_st, ap, current_step, epoch):
|
|||
test_audios = {}
|
||||
test_figures = {}
|
||||
print(" | > Synthesizing test sentences")
|
||||
speaker_id = 0 if c.num_speakers > 1 else None
|
||||
speaker_id = 0 if c.use_speaker_embedding else None
|
||||
for idx, test_sentence in enumerate(test_sentences):
|
||||
try:
|
||||
wav, alignment, decoder_output, postnet_output, stop_tokens = synthesis(
|
||||
|
|
|
@ -109,7 +109,7 @@ def synthesis(model,
|
|||
inputs = text_to_seqvec(text, CONFIG, use_cuda)
|
||||
speaker_id = id_to_torch(speaker_id)
|
||||
if use_cuda:
|
||||
speaker_id.cuda()
|
||||
speaker_id = speaker_id.cuda()
|
||||
# synthesize voice
|
||||
decoder_output, postnet_output, alignments, stop_tokens = run_model(
|
||||
model, inputs, CONFIG, truncated, speaker_id, style_mel)
|
||||
|
|
Loading…
Reference in New Issue