pnorm#
- class diffsptk.MelCepstrumPowerNormalization(cep_order, alpha=0, ir_length=128, device=None, dtype=None)[source]#
See this page for details.
- Parameters:
- cep_orderint >= 0
The order of the cepstrum, \(M\).
- alphafloat in (-1, 1)
The frequency warping factor, \(\alpha\).
- ir_lengthint >= 1
The length of the impulse response.
- forward(x)[source]#
Perform mel-cepstrum power normalization.
- Parameters:
- xTensor [shape=(…, M+1)]
The input mel-cepstrum.
- Returns:
- outTensor [shape=(…, M+2)]
The log power and power-normalized mel-cepstrum.
Examples
>>> x = diffsptk.ramp(1, 4) >>> pnorm = diffsptk.MelCepstrumPowerNormalization(3, alpha=0.1) >>> y = pnorm(x) >>> y tensor([ 8.2942, -7.2942, 2.0000, 3.0000, 4.0000])
- diffsptk.functional.pnorm(x, alpha=0, ir_length=128)[source]#
Perform cepstrum power normalization.
- Parameters:
- xTensor [shape=(…, M+1)]
The input mel-cepstrum.
- alphafloat in (-1, 1)
The frequency warping factor, \(\alpha\).
- ir_lengthint >= 1
The length of the impulse response.
- Returns:
- outTensor [shape=(…, M+2)]
The power-normalized cepstrum.
See also