Skip to content

Commit 7d4275f

Browse files
authored
Merge pull request #115 from sp-nitech/mixed
Support mixed phase filter
2 parents b1a753a + 3a38bf5 commit 7d4275f

File tree

6 files changed

+348
-93
lines changed

6 files changed

+348
-93
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*diffsptk* is a differentiable version of [SPTK](https://github.com/sp-nitech/SPTK) based on the PyTorch framework.
44

55
[![Latest Manual](https://img.shields.io/badge/docs-latest-blue.svg)](https://sp-nitech.github.io/diffsptk/latest/)
6-
[![Stable Manual](https://img.shields.io/badge/docs-stable-blue.svg)](https://sp-nitech.github.io/diffsptk/2.3.0/)
6+
[![Stable Manual](https://img.shields.io/badge/docs-stable-blue.svg)](https://sp-nitech.github.io/diffsptk/2.4.0/)
77
[![Downloads](https://static.pepy.tech/badge/diffsptk)](https://pepy.tech/project/diffsptk)
88
[![Python Version](https://img.shields.io/pypi/pyversions/diffsptk.svg)](https://pypi.python.org/pypi/diffsptk)
99
[![PyTorch Version](https://img.shields.io/badge/pytorch-2.0.0%20%7C%202.6.0-orange.svg)](https://pypi.python.org/pypi/diffsptk)

diffsptk/modules/c2mpir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def forward(self, c):
7777
@staticmethod
7878
def _forward(c, ir_length, n_fft):
7979
C = torch.fft.fft(c, n=n_fft)
80-
h = torch.fft.ifft(cexp(C))[..., :ir_length].real
80+
h = torch.fft.ifft(cexp(C)).real[..., :ir_length]
8181
return h
8282

8383
_func = _forward

diffsptk/modules/imglsadf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ def forward(self, y, mc):
3535
y : Tensor [shape=(..., T)]
3636
Audio signal.
3737
38-
mc : Tensor [shape=(..., T/P, M+1)]
39-
Mel-generalized cepstrum, not MLSA digital filter coefficients.
38+
mc : Tensor [shape=(..., T/P, M+1)] or [shape=(..., T/P, N+M+1)]
39+
Mel-generalized cepstrum, not MLSA digital filter coefficients. Note that
40+
the mixed-phase case assumes that the coefficients are of the form
41+
c_{-N}, ..., c_{0}, ..., c_{M}, where M is the order of the minimum-phase
42+
part and N is the order of the maximum-phase part.
4043
4144
Returns
4245
-------

0 commit comments

Comments
 (0)