I ran the inference style transfer notebook in ipython (interactive, but not a notebook) and it worked!
If you just copy the code from the notebook you won't get the outputs as they are supposed to be embedded in the notebook.
use savefig
to write plots to a file:
plt.savefig("results/inf-test.png")
use scipy.io.wavefile.write to write out the audio:
with torch.no_grad():
audio = denoiser(waveglow.infer(mel_posterior, sigma=0.75), 0.01)
audio = audio.cpu().numpy()
## filename, sampling rate, audio tensor
write("results/inf-test.wav", data_config['sampling_rate'], audio)
with torch.no_grad():
audio_base = denoiser(waveglow.infer(mel_baseline, sigma=0.75), 0.01)
audio_base = audio_base.cpu().numpy()
write("results/inf-test-base.wav", 22050, audio_base)