pytorch / audio

Data manipulation and transformation for audio signal processing, powered by PyTorch
https://pytorch.org/audio
BSD 2-Clause "Simplified" License
2.44k stars 640 forks source link

Adaptive filtering for torchaudio #2619

Open ahmed-fau opened 1 year ago

ahmed-fau commented 1 year ago

🚀 The feature

Hi there, I would to ask if there is any plan to support adaptive filtering functions to torchaudio library so that they can be used in native way for training/optimizing deep learning speech/audio models.

Currently, torchaudio supports 'lfilter' function similar to scipy.signal.lfilter. However, this function isn't easy to run with adaptive filters (i.e., filters whose transfer function changes over frames of an audio signals). Moreover, the lfilter function of torchaudio doesn't return zi (initial conditions for the filter delays), which disables simple refactoring to make it valid for adaptive filtering operations.

Motivation, pitch

Currently, lots of deep neural network models for speech/audio signal generation incorporate classical dsp adaptive filtering techniques such as LPC analysis/synthesis. It would be nice if torchaudio supports such functionality in order to make it ease to use for training these models with pytorch.

Alternatives

No response

Additional context

No response

nateanl commented 1 year ago

Hi @ahmed-fau, thanks for proposing the feature. Could you elaborate what kind of use cases for this adaptive filtering method, and what's the technical details behind the method you propose?