meta-pytorch / meta-pytorch/torchcodec

Return audio sample shape as `(num_samples, num_channels)`

Open
#663 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.2k
Forks
125
Avg merge
22h 47m
Merged PRs (30d)
54

Description

Related to feature request in https://github.com/pytorch/torchcodec/issues/661

We are currently returning (num_channels, num_samples) by default in the audio decoder, because this is the shape that the torchaudio transforms expect. This is also what torchaudio.load() returns. But other APIs like torchaudio.StreamReader or soundfile return (num_samples, num_channels), so some users may be more used to this shape.

I'm opening this issue to gauge interest in this feature, please thumbs up if this is something useful for you.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the audio decoder behavior described here and review the related feature request in issue #661. Compare the current channel-first shape with the conventions used by torchaudio.load(), torchaudio.StreamReader, and soundfile; done requires an agreed default shape and verification that the decoder returns it consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
audio-video-rtc
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.