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
>>> import diffsptk >>> import torch >>> imglsadf = diffsptk.IMLSA(1, frame_period=2) >>> y = diffsptk.step(3) >>> mc = torch.tensor([[0.3, 0.5], [-0.2, 0.1]]) >>> x = imglsadf(y, mc) >>> x tensor([0.7408, 0.6659, 1.1176, 1.1048])