Skip to content
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

[Cherry-picked 0.12] Update audio I/O tutorials #2385

Closed
wants to merge 2 commits into from

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented May 12, 2022

  • Adopt torchaudio.utils.download_asset to simplify asset management.
  • Break down the first section about helper functions.
  • Use tempfile so that executing tutorial won't leave any artifacts on local file system.

Example: https://output.circle-artifacts.com/output/job/b11a0087-8bf9-4999-a74f-b53798eaa77f/artifacts/0/docs/tutorials/audio_io_tutorial.html

@mthrok mthrok marked this pull request as ready for review May 16, 2022 04:19
@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.

@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.

@mthrok mthrok added this to the v0.12 milestone May 24, 2022
examples/tutorials/audio_io_tutorial.py Outdated Show resolved Hide resolved
# >>> Source: https://pytorch-tutorial-assets.s3.amazonaws.com/steam-train-whistle-daniel_simon.mp3
# >>> Fetched 8192 bytes.
# >>> AudioMetaData(sample_rate=44100, num_frames=0, num_channels=2, bits_per_sample=0, encoding=MP3)
# When passing a file-like object, ``info`` does not read
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# When passing a file-like object, ``info`` does not read
# When passing a file-like object, ``info`` cannot access

examples/tutorials/audio_io_tutorial.py Outdated Show resolved Hide resolved
- Adopt `torchaudio.utils.download_asset` to simplify asset management.
- Break down the first section about helper functions.
- Use tempfile so that executing tutorial won't leave any artifacts on local file system.
examples/tutorials/audio_io_tutorial.py Outdated Show resolved Hide resolved
examples/tutorials/audio_io_tutorial.py Outdated Show resolved Hide resolved
Co-authored-by: nateanl <zni@fb.com>
Co-authored-by: hwangjeff <hwangjeff@users.noreply.github.com>
@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

github-actions bot commented Jun 7, 2022

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 update-audio-io-tutorial branch June 7, 2022 17:42
mthrok added a commit that referenced this pull request Jun 7, 2022
Summary:
- Adopt `torchaudio.utils.download_asset` to simplify asset management.
- Break down the first section about helper functions.
- Use tempfile so that executing tutorial won't leave any artifacts on local file system.

Example: https://output.circle-artifacts.com/output/job/b11a0087-8bf9-4999-a74f-b53798eaa77f/artifacts/0/docs/tutorials/audio_io_tutorial.html

Pull Request resolved: #2385

Reviewed By: hwangjeff

Differential Revision: D36404399

Pulled By: mthrok

fbshipit-source-id: 106af34e8ddd22a061aa12767b444b32aef07bad
@mthrok mthrok changed the title Update audio I/O tutorials [Cherry-picked 0.12] Update audio I/O tutorials Jun 7, 2022
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.

4 participants