Skip to content

Crash on startup: AttributeError: torchaudio.list_audio_backends (TorchAudio 2.9 removal) #1118

@nuttyorchid

Description

@nuttyorchid

Self Checks

  • This template is only for bug reports. For questions, please visit Discussions.
  • I have thoroughly reviewed the project documentation (installation, training, inference) but couldn't find information to solve my problem. English 中文 日本語 Portuguese (Brazil)
  • I have searched for existing issues, including closed ones. Search issues
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions