Bump torchaudio version + add bytes#2821
Merged
Merged
Conversation
Collaborator
|
I vote for the bump, it will help for rope as well. |
pplantinga
approved these changes
Feb 10, 2025
pplantinga
left a comment
Collaborator
There was a problem hiding this comment.
I'm good with the version bump, minor comments can be addressed or not
Comment on lines
406
to
411
| if backend not in [None, "ffmpeg", "sox", "soundfile"]: | ||
| raise ValueError( | ||
| "backend must be one of 'ffmpeg', 'sox', 'soundfile' or None" | ||
| "backend must be one of 'ffmpeg', 'sox', 'soundfile' or None", | ||
| "Available backends on your system: ", | ||
| torchaudio.list_audio_backends(), | ||
| ) |
Collaborator
There was a problem hiding this comment.
Not a huge deal but this code seems repeated from above, any way to combine (e.g. unified audio backend checker function)
Collaborator
|
@Adel-Moumen could you fix the tests? |
Co-authored-by: Peter Plantinga <plantinga.peter@proton.me>
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.
What does this PR do?
This PR aims at "fixing" the issue #2820 brought by PR #2781. In the latter PR, I introduced a backward incompatible change to
torchaudio.load. Indeed, specifying thebackendto theloadfunction only came intorchaudio2.1.0. It was also available in2.0.0and2.0.1but at the cost of enabling the flagexport TORCHAUDIO_USE_BACKEND_DISPATCHER=1before importingtorchaudio.After working on a workaround, I found it slower as I had to check at each
read_audiocall thetorchaudiofunction, and check if there was an argumentbackendto the audio function. I think, it safer to upgrade our pytorch requirements to2.1.0for both:torchandtorchaudio. PyTorch is now at version2.6.0and I think it should be safe for us to slowly increase the requirements as the novelties comes to make sure that the toolkit is still working. To be honest, I don't have any clues if there's still people usingspeechbrainwithtorch<2.0.0, or ifspeechbrainis still actually working with a very old version oftorch.Also, with
torch==2.0.0thetorch.compilewas immature with many bugs (sorry PyTorch team, you made a lot of nice progress), and so latter versions of pytorch are getting better and better at handling complex cases of computation graph. So, I would be in favour of slowly increasing ourtorchrequirements, and in this case, bumping totorch>=2.1.0.Any comments/feedbacks @TParcollet @mravanelli, and/or @pplantinga ? :)
Before submitting
PR review
Reviewer checklist