b1935c97fa1175908c579a4db06214174253f5f4,server/synthesizer.py,Synthesizer,tts,#Synthesizer#Any#Any#,173

Before Change


                postnet_output, decoder_output, alignments, stop_tokens)

            if self.pwgan:
                vocoder_input = torch.FloatTensor(postnet_output.T).unsqueeze(0)
                if self.use_cuda:
                    vocoder_input.cuda()
                wav = self.pwgan.inference(vocoder_input, hop_size=self.ap.hop_length)
            elif self.wavernn:
                vocoder_input = None
                if self.tts_config.model == "Tacotron":

After Change


            // convert outputs to numpy
            if self.vocoder_model:
                vocoder_input = postnet_output[0].transpose(0, 1).unsqueeze(0)
                wav = self.vocoder_model.inference(vocoder_input)
                if self.use_cuda:
                    wav = wav.cpu().numpy()
                else:
                    wav = wav.numpy()
                wav = wav.flatten()
            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)
                else:
                    vocoder_input = postnet_output[0].transpose(0, 1).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)
            // trim silence
            wav = trim_silence(wav, self.ap)

            wavs += list(wav)
            wavs += [0] * 10000

        out = io.BytesIO()
        self.save_wav(wavs, out)

        // compute stats
        process_time = time.time() - start_time
        audio_time = len(wavs) / self.tts_config.audio["sample_rate"]
        print(f" > Processing time: {process_time}")
        print(f" > Real-time factor: {process_time / audio_time}")
        return out
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: mozilla/TTS
Commit Name: b1935c97fa1175908c579a4db06214174253f5f4
Time: 2020-06-26
Author: erogol@hotmail.com
File Name: server/synthesizer.py
Class Name: Synthesizer
Method Name: tts


Project Name: mozilla/TTS
Commit Name: 3b57e88a66ba1f410be70dbd2ad2899b5b1bcb0e
Time: 2020-02-19
Author: reuben.morais@gmail.com
File Name: server/synthesizer.py
Class Name: Synthesizer
Method Name: tts


Project Name: mozilla/TTS
Commit Name: 02e6d0538272f589d6c3c290b81575b7bd866991
Time: 2020-02-13
Author: reuben.morais@gmail.com
File Name: server/synthesizer.py
Class Name: Synthesizer
Method Name: tts