mirror of
https://github.com/malarinv/tacotron2
synced 2026-03-08 01:32:35 +00:00
bugfix for vocoder arg
This commit is contained in:
@@ -104,12 +104,12 @@ class TTSModel(object):
|
|||||||
def synth_speech_array(self, text, vocoder):
|
def synth_speech_array(self, text, vocoder):
|
||||||
mel_outputs_postnet = self.generate_mel_postnet(text)
|
mel_outputs_postnet = self.generate_mel_postnet(text)
|
||||||
|
|
||||||
if method == "wavglow":
|
if vocoder == "wavglow":
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
audio_t = self.waveglow.infer(mel_outputs_postnet, sigma=0.666)
|
audio_t = self.waveglow.infer(mel_outputs_postnet, sigma=0.666)
|
||||||
audio_t = self.denoiser(audio_t, 0.1)[0]
|
audio_t = self.denoiser(audio_t, 0.1)[0]
|
||||||
audio = audio_t[0].data.cpu().numpy()
|
audio = audio_t[0].data.cpu().numpy()
|
||||||
elif method == "gl":
|
elif vocoder == "gl":
|
||||||
mel_decompress = self.taco_stft.spectral_de_normalize(mel_outputs_postnet)
|
mel_decompress = self.taco_stft.spectral_de_normalize(mel_outputs_postnet)
|
||||||
mel_decompress = mel_decompress.transpose(1, 2).data.cpu()
|
mel_decompress = mel_decompress.transpose(1, 2).data.cpu()
|
||||||
spec_from_mel_scaling = 1000
|
spec_from_mel_scaling = 1000
|
||||||
|
|||||||
Reference in New Issue
Block a user