mirror of https://github.com/coqui-ai/TTS.git
server fix
This commit is contained in:
parent
c4e688e067
commit
fb89b6b4ff
|
@ -175,13 +175,15 @@ class Synthesizer(object):
|
||||||
|
|
||||||
for sen in sens:
|
for sen in sens:
|
||||||
# preprocess the given text
|
# preprocess the given text
|
||||||
inputs = text_to_seqvec(sen, self.tts_config, self.use_cuda)
|
inputs = text_to_seqvec(sen, self.tts_config)
|
||||||
|
inputs = numpy_to_torch(inputs, torch.long, cuda=self.use_cuda)
|
||||||
|
inputs = inputs.unsqueeze(0)
|
||||||
# synthesize voice
|
# synthesize voice
|
||||||
decoder_output, postnet_output, alignments, _ = run_model_torch(
|
decoder_output, postnet_output, alignments, stop_tokens = run_model_torch(
|
||||||
self.tts_model, inputs, self.tts_config, False, speaker_id, None)
|
self.tts_model, inputs, self.tts_config, False, speaker_id, None)
|
||||||
# convert outputs to numpy
|
# convert outputs to numpy
|
||||||
postnet_output, decoder_output, _ = parse_outputs(
|
postnet_output, decoder_output, _, _ = parse_outputs_torch(
|
||||||
postnet_output, decoder_output, alignments)
|
postnet_output, decoder_output, alignments, stop_tokens)
|
||||||
|
|
||||||
if self.pwgan:
|
if self.pwgan:
|
||||||
vocoder_input = torch.FloatTensor(postnet_output.T).unsqueeze(0)
|
vocoder_input = torch.FloatTensor(postnet_output.T).unsqueeze(0)
|
||||||
|
|
Loading…
Reference in New Issue