Skip to content

Commit

Permalink
Merge pull request #115 from sp-nitech/mixed
Browse files Browse the repository at this point in the history
Support mixed phase filter
  • Loading branch information
takenori-y authored Feb 4, 2025
2 parents b1a753a + 3a38bf5 commit 7d4275f
Show file tree
Hide file tree
Showing 6 changed files with 348 additions and 93 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*diffsptk* is a differentiable version of [SPTK](https://github.com/sp-nitech/SPTK) based on the PyTorch framework.

[![Latest Manual](https://img.shields.io/badge/docs-latest-blue.svg)](https://sp-nitech.github.io/diffsptk/latest/)
[![Stable Manual](https://img.shields.io/badge/docs-stable-blue.svg)](https://sp-nitech.github.io/diffsptk/2.3.0/)
[![Stable Manual](https://img.shields.io/badge/docs-stable-blue.svg)](https://sp-nitech.github.io/diffsptk/2.4.0/)
[![Downloads](https://static.pepy.tech/badge/diffsptk)](https://pepy.tech/project/diffsptk)
[![Python Version](https://img.shields.io/pypi/pyversions/diffsptk.svg)](https://pypi.python.org/pypi/diffsptk)
[![PyTorch Version](https://img.shields.io/badge/pytorch-2.0.0%20%7C%202.6.0-orange.svg)](https://pypi.python.org/pypi/diffsptk)
Expand Down
2 changes: 1 addition & 1 deletion diffsptk/modules/c2mpir.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def forward(self, c):
@staticmethod
def _forward(c, ir_length, n_fft):
C = torch.fft.fft(c, n=n_fft)
h = torch.fft.ifft(cexp(C))[..., :ir_length].real
h = torch.fft.ifft(cexp(C)).real[..., :ir_length]
return h

_func = _forward
7 changes: 5 additions & 2 deletions diffsptk/modules/imglsadf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ def forward(self, y, mc):
y : Tensor [shape=(..., T)]
Audio signal.
mc : Tensor [shape=(..., T/P, M+1)]
Mel-generalized cepstrum, not MLSA digital filter coefficients.
mc : Tensor [shape=(..., T/P, M+1)] or [shape=(..., T/P, N+M+1)]
Mel-generalized cepstrum, not MLSA digital filter coefficients. Note that
the mixed-phase case assumes that the coefficients are of the form
c_{-N}, ..., c_{0}, ..., c_{M}, where M is the order of the minimum-phase
part and N is the order of the maximum-phase part.
Returns
-------
Expand Down
Loading

0 comments on commit 7d4275f

Please sign in to comment.