mcpf#

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

See this page for details.

Parameters:
cep_orderint >= 0

The order of the mel-cepstrum, \(M\).

alphafloat in (-1, 1)

The frequency warping factor, \(\alpha\).

betafloat

The intensity parameter, \(\beta\).

onsetint >= 0

The onset index.

ir_lengthint >= 1

The length of the impulse response.

References

[1]

T. Yoshimura et al., “Incorporating a mixed excitation model and postfilter into HMM-based text-to-speech synthesis,” Systems and Computers in Japan, vol. 36, no. 12, pp. 43-50, 2005.

forward(mc)[source]#

Perform mel-cesptrum postfiltering.

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

The input mel-cepstral coefficients.

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

The 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])
diffsptk.functional.mcpf(mc, alpha=0, beta=0, onset=2, ir_length=128)[source]#

Perform mel-cesptrum postfiltering.

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

The input mel-cepstral coefficients.

alphafloat in (-1, 1)

The frequency warping factor, \(\alpha\).

betafloat

The intensity parameter, \(\beta\).

onsetint >= 0

The onset index.

ir_lengthint >= 1

The length of the impulse response.

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

The postfiltered mel-cepstral coefficients.

See also

mgcep