imglsadf#

diffsptk.IMLSA#

alias of PseudoInverseMGLSADigitalFilter

class diffsptk.PseudoInverseMGLSADigitalFilter(filter_order: int, frame_period: int, **kwargs)[source]#

See PseudoMGLSADigitalFilter() for details.

forward(y: Tensor, mc: Tensor) Tensor[source]#

Apply an inverse MGLSA digital filter.

Parameters:
yTensor [shape=(…, T)]

The input signal.

mcTensor [shape=(…, T/P, M+1)] or [shape=(…, T/P, N+M+1)]

The 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:
outTensor [shape=(…, T)]

The residual signal.

Examples

>>> M = 4
>>> y = diffsptk.step(3)
>>> mc = diffsptk.nrand(2, M)
>>> mc
tensor([[ 0.8457,  1.5812,  0.1379,  1.6558,  1.4591],
        [-1.3714, -0.9669, -1.2025, -1.3683, -0.2352]])
>>> imglsadf = diffsptk.IMLSA(M, frame_period=2)
>>> x = imglsadf(y.view(1, -1), mc.view(1, 2, M + 1))
>>> x
tensor([[ 0.4293,  1.0592,  7.9349, 14.9794]])