ndps2c#

class diffsptk.NegativeDerivativeOfPhaseSpectrumToCepstrum(cep_order, fft_length)[source]#

See this page for details.

Parameters:
cep_orderint >= 0 [scalar]

Order of cepstrum, \(M\).

fft_lengthint >= 2 [scalar]

Number of FFT bins, \(L\).

forward(n)[source]#

Convert NPDS to cepstrum.

Parameters:
nTensor [shape=(…, L/2+1)]

NDPS.

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

Cepstrum.

Examples

>>> n = diffsptk.ramp(4)
>>> ndps2c = diffsptk.NegativeDerivativeOfPhaseSpectrumToCepstrum(4, 8)
>>> c = ndps2c(n)
>>> c
tensor([ 0.0000, -1.7071,  0.0000, -0.0976,  0.0000])

See also

c2ndps