AttributeError: module 'torchaudio' has no attribute 'list_audio_backends'

Author: matrnCreated Dec 3, 2025Updated Feb 16, 2026
Labelsbug

Describe the bug

The check_torchaudio_backend function calls the torchaudio.list_audio_backends() but this function is deprecated since version 2.9 - https://docs.pytorch.org/audio/main/generated/torchaudio.list_audio_backends.html - which causes:

python
...
...speechbrain/utils/torch_audio_backend.py", line 57, in check_torchaudio_backend
    available_backends = torchaudio.list_audio_backends()
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'torchaudio' has no attribute 'list_audio_backends'

Expected behaviour

Not caussing AttributeError

To Reproduce

python
from speechbrain.inference.speaker import EncoderClassifier

EncoderClassifier.from_hparams(
    source="speechbrain/spkrec-ecapa-voxceleb",
    savedir="pretrained_models/spkrec-ecapa-voxceleb",
    run_opts={"device": "cpu"},
)

Environment Details

speechbrain==1.0.3
torch==2.9.1+cpu
torchaudio==2.9.1+cpu
torchcodec==0.8.1

Relevant Log Output

bash

Additional Context

No response