pqmf#

diffsptk.PQMF#

alias of PseudoQuadratureMirrorFilterBankAnalysis

class diffsptk.PseudoQuadratureMirrorFilterBankAnalysis(n_band, filter_order, alpha=100, learnable=False, **kwargs)[source]#

See this page for details.

Parameters:
n_bandint >= 1

Number of subbands, \(K\).

filter_orderint >= 2

Order of filter, \(M\).

alphafloat > 0

Stopband attenuation in dB.

learnablebool

Whether to make filter-bank coefficients learnable.

**kwargsadditional keyword arguments

Parameters to find optimal filter-bank coefficients.

References

[1]

T. Q. Nguyen, “Near-perfect-reconstruction pseudo-QMF banks,” IEEE Transactions on Signal Processing, vol. 42, no. 1, pp. 65-76, 1994.

[2]

F. Cruz-Roldan et al., “An efficient and simple method for designing prototype filters for cosine-modulated filter banks,” IEEE Signal Processing Letters, vol. 9, no. 1, pp. 29-31, 2002.

forward(x)[source]#

Decompose waveform into subband waveforms.

Parameters:
xTensor [shape=(B, 1, T) or (B, T) or (T,)]

Original waveform.

Returns:
outTensor [shape=(B, K, T)]

Subband waveforms.

Examples

>>> x = diffsptk.ramp(0, 1, 0.25)
>>> pqmf = diffsptk.PQMF(2, 10)
>>> y = pmqf(x)
>>> y
tensor([[[ 0.1605,  0.4266,  0.6927,  0.9199,  1.0302],
         [-0.0775, -0.0493, -0.0211, -0.0318,  0.0743]]])

See also

ipqmf decimate