audio
audio copied to clipboard
torchaudio.functional.resample() doesn't work with complex types
🐛 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'
Hi @pfeatherstone, thank you for opening the issue. Could you share more details on your use case for us to figure out to how to address this?
I wanted to resample some IQ data. It's not a problem. The filter is real-valued so you can resample real and imaginary separately.