NVIDIA / waveglow

A Flow-based Generative Network for Speech Synthesis
BSD 3-Clause "New" or "Revised" License
2.29k stars 530 forks source link

denoised-output write error #243

Open leonvit opened 3 years ago

leonvit commented 3 years ago

I successfuly denoise the ouput but when i try to save it using soundfile i get a: RuntimeError: Error opening 'output/denoised.wav': Format not recognised.

Key code:

audio_denoised = denoiser(audio, strength=denoise_strength)[:, 0];print("Denoised") sf.write("output/denoised.wav", audio_denoised.cpu().numpy(), hparams.sampling_rate)

Full output:

Traceback (most recent call last): File "voice.py", line 84, in sf.write("output/denoised.wav", audio_denoised.cpu().numpy(), hparams.sampling_rate) File "/home/leon/.local/lib/python3.7/site-packages/soundfile.py", line 315, in write subtype, endian, format, closefd) as f: File "/home/leon/.local/lib/python3.7/site-packages/soundfile.py", line 629, in init self._file = self._open(file, mode_int, closefd) File "/home/leon/.local/lib/python3.7/site-packages/soundfile.py", line 1184, in _open "Error opening {0!r}: ".format(self.name)) File "/home/leon/.local/lib/python3.7/site-packages/soundfile.py", line 1357, in _error_check raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace')) RuntimeError: Error opening 'output/denoised.wav': Format not recognised.

(Note the not denoised output works is saved correctly)