pytorch / pytorch/audio

Initial condition support for torchaudio.functional.lfilter

Open
#2,500 5 comments 2 reactions 1 assignee View on GitHub

@nateanl is already working on this.

Since Jul 26, 2022.

Dominant language
Python
Stars
2.9k
Forks
799
Avg merge
58m
Merged PRs (30d)
3

Description

🚀 The feature

scipy.signal.lfilter supports an initial condition zi. This is critical for dealing with streaming inputs where we get one sample at a time. This feature is currently missing in torchaudio.functional.lfilter.

Motivation, pitch

Without support for initial condition, I had to maintain a large sliding window of signals and apply the filter on this entire window every time I get a new input. If the initial condition is supported, then it becomes much more efficient. For my particular use case, I've been porting scipy based code to pytorch and ran into this issue.

Alternatives

No response

Additional context

No response

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.