torchaudio.functional.resample() doesn't work with complex types
Open
Nobody has claimed this yet.
triaged
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 799
- Avg merge
- 58m
- Merged PRs (30d)
- 3
Description
🐛 Describe the bug
torchaudio.functional.resample() doesn't work with complex types.
Example:
x = torch.randn(1024, 2)
x = torch.view_as_complex(x)
y = torchaudio.functional.resample(x, 1.0, 2.0)
Gives error:
RuntimeError: "arange_cpu" not implemented for 'ComplexFloat'
Versions
>>> import torch
>>> import torchaudio
>>> torch.__version__
'2.0.0+cu117'
>>> torchaudio.__version__
'2.0.1+cu117'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided complex-tensor example through torchaudio.functional.resample() and trace the resampling path that reaches the arange_cpu error. Check existing resampling tests and add coverage for complex input; done means the example completes successfully without the complex-type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100