From 70a8210283bbbd613fcd55f17ef8ebb7bdaac32e Mon Sep 17 00:00:00 2001 From: fatihkiralioglu <38240476+fatihkiralioglu@users.noreply.github.com> Date: Sat, 25 Apr 2020 15:18:46 +0300 Subject: [PATCH 1/2] Tacotron1 + wavernn configuration fix Tacotron1 + wavernn configuration: corrected the input format for wavernn vocoder, converted spectrograms to mels --- server/synthesizer.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/synthesizer.py b/server/synthesizer.py index e9205bf1..3268be46 100644 --- a/server/synthesizer.py +++ b/server/synthesizer.py @@ -184,7 +184,12 @@ class Synthesizer(object): vocoder_input.cuda() wav = self.pwgan.inference(vocoder_input, hop_size=self.ap.hop_length) elif self.wavernn: - vocoder_input = torch.FloatTensor(postnet_output.T).unsqueeze(0) + vocoder_input = None + if self.tts_config.model == "Tacotron" : + vocoder_input = torch.FloatTensor(self.ap.out_linear_to_mel(linear_spec = postnet_output.T).T).T.unsqueeze(0) + else: + vocoder_input = torch.FloatTensor(postnet_output.T).unsqueeze(0) + if self.use_cuda: vocoder_input.cuda() wav = self.wavernn.generate(vocoder_input, batched=self.config.is_wavernn_batched, target=11000, overlap=550) From cc11be06d7efd1e9a2a1cd5a35e7f790592e5067 Mon Sep 17 00:00:00 2001 From: fatihkiralioglu <38240476+fatihkiralioglu@users.noreply.github.com> Date: Mon, 27 Apr 2020 09:53:52 +0300 Subject: [PATCH 2/2] fixing "No space allowed before..." compile errors fixing "No space allowed before..." compile errors --- server/synthesizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/synthesizer.py b/server/synthesizer.py index 3268be46..10f4fb0a 100644 --- a/server/synthesizer.py +++ b/server/synthesizer.py @@ -185,8 +185,8 @@ class Synthesizer(object): wav = self.pwgan.inference(vocoder_input, hop_size=self.ap.hop_length) elif self.wavernn: vocoder_input = None - if self.tts_config.model == "Tacotron" : - vocoder_input = torch.FloatTensor(self.ap.out_linear_to_mel(linear_spec = postnet_output.T).T).T.unsqueeze(0) + if self.tts_config.model == "Tacotron": + vocoder_input = torch.FloatTensor(self.ap.out_linear_to_mel(linear_spec=postnet_output.T).T).T.unsqueeze(0) else: vocoder_input = torch.FloatTensor(postnet_output.T).unsqueeze(0)