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.
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)
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)