Crash on startup: AttributeError: torchaudio.list_audio_backends (TorchAudio 2.9 removal)
Self Checks
- [x] This template is only for bug reports. For questions, please visit Discussions.
- [x] I have thoroughly reviewed the project documentation (installation, training, inference) but couldn't find information to solve my problem. English 中文 日本語 Portuguese (Brazil)
- [x] I have searched for existing issues, including closed ones. Search issues
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template and fill in all required fields.
Cloud or Self Hosted
Self Hosted (Source)
Environment Details
ubuntu24.04 / cuda128 / torchaudio==2.9.0
Steps to Reproduce
Running Fish Audio with TorchAudio 2.9.0 fails due to removal of torchaudio.list_audio_backends(), which is still called in fish-agent/tools/api.py. The function was deprecated in 2.8 and fully removed in 2.9 (released Oct 2025).
The project’s pyproject.toml declares:
cu128 = [ "torch>=2.5.1", "torchaudio", ]
so torchaudio is unpinned, allowing 2.9+ to install automatically and break compatibility.
Reproduction Steps
Create and activate a clean conda environment:
conda create -n fish python=3.11 conda activate fish
Install Fish Audio in editable mode with the CUDA 12.8 extras:
pip install -e .[cu128]
Run the Fish Audio agent or any module initializing audio I/O.
Observe the crash:
AttributeError: module 'torchaudio' has no attribute 'list_audio_backends'
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
python -m tools.run_webui or python -m tools.api_server
Both will Observe the crash:
backends = torchaudio.list_audio_backends() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: module 'torchaudio' has no attribute 'list_audio_backends'
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu129 should fix it.
That worked for me.
Yes, It works
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu129 should fix it.