mcpf#

class diffsptk.MelCepstrumPostfiltering(cep_order, alpha=0, beta=0, onset=2, ir_length=1024)[source]#

See this page for details.

Parameters:
cep_orderint >= 0 [scalar]

Order of mel-cepstrum, \(M\).

alphafloat [-1 < alpha < 1]

Frequency warping factor, \(\alpha\).

betafloat [scalar]

Intensity parameter, \(\beta\).

onsetint >= 0 [scalar]

Onset index.

ir_lengthint >= 1 [scalar]

Length of impulse response.

forward(mc1)[source]#

Perform mel-cesptrum postfiltering.

Parameters:
mc1Tensor [shape=(…, M+1)]

Mel-cepstral coefficients.

Returns:
mc2Tensor [shape=(…, M+1)]

Postfiltered mel-cepstral coefficients.

Examples

>>> X = diffsptk.nrand(4).square()
>>> X
tensor([0.2725, 2.5650, 0.3552, 0.3757, 0.1904])
>>> mcep = diffsptk.MelCepstralAnalysis(3, 8, 0.1)
>>> mcpf = diffsptk.MelCepstrumPostfiltering(3, 0.1, 0.2)
>>> mc1 = mcep(X)
>>> mc1
tensor([-0.2819,  0.3486, -0.2487, -0.3600])
>>> mc2 = mcpf(mc1)
>>> mc2
tensor([-0.3256,  0.3486, -0.2984, -0.4320])

See also

mgcep