fix: add torchaudio 2.9 compatibility for list_audio_backends removal#1148
Open
Mr-Neutr0n wants to merge 1 commit intofishaudio:mainfrom
Open
fix: add torchaudio 2.9 compatibility for list_audio_backends removal#1148Mr-Neutr0n wants to merge 1 commit intofishaudio:mainfrom
Mr-Neutr0n wants to merge 1 commit intofishaudio:mainfrom
Conversation
torchaudio.list_audio_backends() was deprecated in 2.8 and removed in 2.9. Added try/except to handle both old and new torchaudio versions. For torchaudio 2.9+, attempts to detect ffmpeg availability by trying to import the ffmpeg-related module, falling back to soundfile if unavailable. Fixes fishaudio#1118
Author
|
Friendly bump! Let me know if there's anything I should update or improve to help move this forward. |
Contributor
|
This PR is stale because it has been open for 30 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix crash on startup with torchaudio 2.9+ due to removed
list_audio_backends()function.Problem
torchaudio.list_audio_backends()was deprecated in torchaudio 2.8 and removed in 2.9 (released Oct 2025). Since the project'spyproject.tomlhas unpinned torchaudio dependency, users installing with CUDA 12.8 extras get torchaudio 2.9+, which causes:Affected files:
tools/vqgan/extract_vq.pyfish_speech/inference_engine/reference_loader.pySolution
Added try/except to handle both old and new torchaudio versions:
list_audio_backends()as beforeThis maintains backward compatibility while supporting the latest torchaudio.
Fixes #1118