操作系统:Windows 11
错误信息:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[17], line 1
----> 1 torchaudio.save("output1.wav", torch.from_numpy(wavs[0]), 24000, format='wav')
File F:\conda\Lib\site-packages\torchaudio\_backend\utils.py:311, in get_save_func.<locals>.save(uri, src, sample_rate, channels_first, format, encoding, bits_per_sample, buffer_size, backend, compression)
223 def save(
224 uri: Union[BinaryIO, str, os.PathLike],
225 src: torch.Tensor,
(...)
233 compression: Optional[Union[CodecConfig, float, int]] = None,
234 ):
235 """Save audio data to file.
236
237 Note:
(...)
309
310 """
--> 311 backend = dispatcher(uri, format, backend)
312 return backend.save(
313 uri, src, sample_rate, channels_first, format, encoding, bits_per_sample, buffer_size, compression
314 )
File F:\conda\Lib\site-packages\torchaudio\_backend\utils.py:221, in get_save_func.<locals>.dispatcher(uri, format, backend_name)
219 if backend.can_encode(uri, format):
220 return backend
--> 221 raise RuntimeError(f"Couldn't find appropriate backend to handle uri {uri} and format {format}.")
RuntimeError: Couldn't find appropriate backend to handle uri output1.wav and format wav.
我已经安装了 soundfile和pysoundfile,但仍然错误。