def test():
print("testing...")
fake = generator(fixed_noise).data.cpu().numpy()
print(fake.shape)
fake = fake.reshape(-1, sampler.num_memory_channels, sampler.num_history, sampler.memory_size)
print(fake.shape)
fake_real = fake[0:,0:1,0:sampler.num_history,0:sampler.memory_size]
fake_imag = fake[0:,1:2,0:sampler.num_history,0:sampler.memory_size]
fake = fake_real + 1j * fake_imag
print(fake.shape)
fake = fake.reshape(-1, sampler.memory_size)
print(fake.shape)
output_wav = stft.istft(fake / spectrogram.spec_norm)
print(output_wav.shape)
wavfile.write("test.wav", 8000, output_wav.reshape(-1))
评论列表
文章目录