1
使用demo时候出现下列错误,求解呀 后端安装ffmpeg出现
File "llm/ChatTTS/testTTs.py", line 12, in <module>
torchaudio.save("output1.wav", torch.from_numpy(wavs[0]), 24000)
File "miniconda3/envs/llm/lib/python3.11/site-packages/torchaudio/_backend/utils.py", line 313, in save
return backend.save(
^^^^^^^^^^^^^
File "miniconda3/envs/llm/lib/python3.11/site-packages/torchaudio/_backend/ffmpeg.py", line 316, in save
save_audio(
File "miniconda3/envs/llm/lib/python3.11/site-packages/torchaudio/_backend/ffmpeg.py", line 248, in save_audio
s.add_audio_stream(
File "miniconda3/envs/llm/lib/python3.11/site-packages/torio/io/_streaming_media_encoder.py", line 278, in add_audio_stream
self._s.add_audio_stream(
RuntimeError: Failed to create input filter: "time_base=1/24000:sample_rate=24000:sample_fmt=flt:channel_layout=0x0" (Invalid argument)
Exception raised from add_src at /__w/audio/audio/pytorch/audio/src/libtorio/ffmpeg/filter_graph.cpp:91 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x57 (0x7f47b42cf897 in miniconda3/envs/llm/lib/python3.11/site-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::string const&) + 0x64 (0x7f47b427fb25 in miniconda3/envs/llm/lib/python3.11/site-packages/torch/lib/libc10.so)
frame #2: torio::io::FilterGraph::add_src(AVFilter const*, std::string const&) + 0x37f (0x7f47b23a871f in miniconda3/envs/llm/lib/python3.11/site-packages/torio/lib/libtorio_ffmpeg4.so)