-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor arg mapping in ffmpeg save function #3387
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/audio/3387
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New FailuresAs of commit 90061a1: NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
51f2016
to
a274231
Compare
6ee34ad
to
3d28125
Compare
The arguments of TorchAudio's save function ("format", "bits_per_sample" and "encoding") are not one-to-one mapping to the arguments of FFmpeg encoding. For example, to use vorbis codec, FFmpeg expects "ogg" container/extension with "vorbis" encoder. It does not recognize "vorbis" extension like TorchAudio (libsox) does. This commit refactors the logic to parse/map the arguments. As a result it now properly works with vorbis and mp3 extension.
@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Hey @mthrok. Some guidance:Use 'module: ops' for operations under 'torchaudio/{transforms, functional}', and ML-related components under 'torchaudio/csrc' (e.g. RNN-T loss). Things in "examples" directory:
Please use 'other' tag only when you’re sure the changes are not much relevant to users, or when all other tags are not applicable. Try not to use it often, in order to minimize efforts required when we prepare release notes. When preparing release notes, please make sure 'documentation' and 'tutorials' occur as the last sub-categories under each primary category like 'new feature', 'improvements' or 'prototype'. Things related to build are by default excluded from the release note, except when it impacts users. For example: |
The arguments of TorchAudio's save function ("format", "bits_per_sample" and "encoding")
are not one-to-one mapping to the arguments of FFmpeg encoding.
For example, to use vorbis codec, FFmpeg expects "ogg" container/extension with "vorbis"
encoder. It does not recognize "vorbis" extension like TorchAudio (libsox) does.
This commit refactors the logic to parse/map the arguments.
As a result it now properly works with vorbis and mp3 extension.