Traceback (most recent call last):
? File "<stdin>", line 1, in <module>
? File "/data/miniconda3/envs/musicgen/lib/python3.9/site-packages/torchaudio/backend/sox_io_backend.py", line 256, in load
? ? return _fallback_load(filepath, frame_offset, num_frames, normalize, channels_first, format)
? File "/data/miniconda3/envs/musicgen/lib/python3.9/site-packages/torchaudio/backend/sox_io_backend.py", line 30, in _fail_load
? ? raise RuntimeError("Failed to load audio from {}".format(filepath))
RuntimeError: Failed to load audio from ./assets/bach.mp3
原因:
Starting 0.12, the MP3 decoder is switched to libavcodec. The error indicates that there is no installation of FFmpeg 4. Please install ffmpeg 4.?conda install 'ffmpeg<5'
?should do in most cases.
解决方式:
conda install 'ffmpeg<5'