Skip to content

Conversation

@mthrok
Copy link
Contributor

@mthrok mthrok commented Jun 14, 2022

Loading and querying file-like object is not possible to use the fallback
mechanism introduced in #2419 because file-like objects are not seekable.

This commit add special case handling to mp3.

For filelike object mp3 input, it was required to pass format="mp3"
because libsox did not auto detect the format.

With the transition of mp3 handling from libsox to ffmpeg, the logic
is to let the ffmpeg handle it without waiting for libsox to fail,
if the format="mp3"

Note: This is back port of #2477.

Loading and querying file-like object is not possible to use the fallback
mechanism introduced in pytorch#2419 because file-like objects are not seekable.

This commit add special case handling to mp3.

For filelike object mp3 input, it was required to pass `format="mp3"`
because libsox did not auto detect the format.

With the transition of mp3 handling from libsox to ffmpeg, the logic
is to let the ffmpeg handle it without waiting for libsox to fail,
if the `format="mp3"`
@mthrok mthrok marked this pull request as ready for review June 14, 2022 21:07
@mthrok mthrok requested a review from carolineechen June 14, 2022 21:07
@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@github-actions
Copy link

Hey @mthrok.
You merged this PR, but labels were not properly added. Please add a primary and secondary label (See https://github.com/pytorch/audio/blob/main/.github/process_commit.py)

@mthrok mthrok deleted the mp3 branch June 16, 2022 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants