c2mpir

class diffsptk.CepstrumToImpulseResponse(cep_order, impulse_response_length)[source]

See this page for details.

Parameters
cep_orderint >= 1 [scalar]

Order of cepstrum, \(M\).

impulse_response_lengthint >= 1 [scalar]

Length of impulse response, \(N\).

forward(c)[source]

Convert cepstrum to impulse response.

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

Cepstral coefficients.

Returns
hTensor [shape=(…, N)]

Truncated impulse response.

Examples

>>> c = diffsptk.ramp(3)
>>> c2mpir = diffsptk.CepstrumToImpulseResponse(3, 5)
>>> h = c2mpir(c)
>>> h
tensor([1.0000, 1.0000, 2.5000, 5.1667, 6.0417])