mirror of https://github.com/coqui-ai/TTS.git
Some bug fixes
parent
e156738920
commit
25b6769246
|
@ -305,8 +305,7 @@ class Decoder(nn.Module):
|
||||||
if t > inputs.shape[1]/2 and stop_token > 0.6:
|
if t > inputs.shape[1]/2 and stop_token > 0.6:
|
||||||
break
|
break
|
||||||
elif t > self.max_decoder_steps:
|
elif t > self.max_decoder_steps:
|
||||||
print(" !! Decoder stopped with 'max_decoder_steps'. \
|
print(" | | > Decoder stopped with 'max_decoder_steps")
|
||||||
Something is probably wrong.")
|
|
||||||
break
|
break
|
||||||
assert greedy or len(outputs) == T_decoder
|
assert greedy or len(outputs) == T_decoder
|
||||||
# Back to batch first
|
# Back to batch first
|
||||||
|
|
5
train.py
5
train.py
|
@ -301,7 +301,7 @@ def evaluate(model, criterion, criterion_st, data_loader, ap, current_step):
|
||||||
# test sentences
|
# test sentences
|
||||||
ap.griffin_lim_iters = 60
|
ap.griffin_lim_iters = 60
|
||||||
for idx, test_sentence in enumerate(test_sentences):
|
for idx, test_sentence in enumerate(test_sentences):
|
||||||
wav, linear_out, alignments = synthesis(model, ap, test_sentence, use_cuda,
|
wav, linear_spec, alignments = synthesis(model, ap, test_sentence, use_cuda,
|
||||||
c.text_cleaner)
|
c.text_cleaner)
|
||||||
try:
|
try:
|
||||||
wav_name = 'TestSentences/{}'.format(idx)
|
wav_name = 'TestSentences/{}'.format(idx)
|
||||||
|
@ -310,10 +310,9 @@ def evaluate(model, criterion, criterion_st, data_loader, ap, current_step):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
align_img = alignments[0].data.cpu().numpy()
|
align_img = alignments[0].data.cpu().numpy()
|
||||||
linear_spec = linear_output[0].data.cpu().numpy()
|
|
||||||
linear_spec = plot_spectrogram(linear_spec, ap)
|
linear_spec = plot_spectrogram(linear_spec, ap)
|
||||||
align_img = plot_alignment(align_img)
|
align_img = plot_alignment(align_img)
|
||||||
tb.add_image('TestSentences/{}_GroundTruth'.format(idx), gt_spec, current_step)
|
tb.add_image('TestSentences/{}_Spectrogram'.format(idx), linear_spec, current_step)
|
||||||
tb.add_image('TestSentences/{}_Alignment'.format(idx), align_img, current_step)
|
tb.add_image('TestSentences/{}_Alignment'.format(idx), align_img, current_step)
|
||||||
return avg_linear_loss
|
return avg_linear_loss
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue