コード例 #1
0
    def wave_generate(self, spec, path):

        if self.args.use_wavenet:
            from wavenet import wavegen
            waveform = wavegen(self.vocoder, c=spec)
            librosa.output.write_wav(path, waveform, sr=16000)

        elif self.args.use_griflin:
            spectrogram2wav(spec, self.hparams, path, use_mel=True)
コード例 #2
0
    def wave_generate(self, spec, path):

        if self.args.use_wavenet:
            from wavenet import wavegen
            path = path + '_wv.wav'
            waveform = wavegen(self.vocoder, c=spec)
            librosa.output.write_wav(path, waveform, sr=16000)

        elif self.args.use_griflin:
            path = path + '_gf.wav'
            melspectrogram2wav(spec, path)