Skip to content

temporary fix on the torchaudio IO#80

Open
YunchaoYang wants to merge 2 commits intofacebookresearch:mainfrom
YunchaoYang:fix/torchaudio-upgrade-2.9
Open

temporary fix on the torchaudio IO#80
YunchaoYang wants to merge 2 commits intofacebookresearch:mainfrom
YunchaoYang:fix/torchaudio-upgrade-2.9

Conversation

@YunchaoYang
Copy link
Copy Markdown

Why ?

The SONAR test suite fails on fairseq2 v0.7 when running with torchaudio 2.9+ because: according to the torchaudio updates. Furture torchaudio will move the IO features to torchcodec.

torchaudio.list_audio_backends() has been removed in torchaudio 2.9.
torchaudio.save() and torchaudio.load() I/O APIs have been deprecated and removed

How ?

Since torchaudio is only used in test files (not in production code), this PR implements a temporary fix by replacing torchaudio I/O with scipy.io.wavfile().

Test plan

How did you test your changes ?
Include full command line to help other people reproduce if needed.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 2, 2026
pyproject.toml Outdated
"fairseq2>=0.5.2",
# "mpmath==1.3.0", # I am not sure if we need it
"numpy>=1.21",
"scipy>=1.7",
Copy link
Copy Markdown
Contributor

@artemru artemru Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add it only for dev and not as main dep

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I already moved scipy to dev dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants