lsp2lpc#

class diffsptk.LineSpectralPairsToLinearPredictiveCoefficients(lpc_order, log_gain=False)[source]#

See this page for details.

Parameters:
lpc_orderint >= 0 [scalar]

Order of LPC, \(M\).

log_gainbool [scalar]

If True, assume input gain is in log scale.

forward(w)[source]#

Convert LSP to LPC.

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

LSP coefficients in radians.

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

LPC coefficients.

Examples

>>> w = diffsptk.ramp(3)
>>> lsp2lpc = diffsptk.LineSpectralPairsToLinearPredictiveCoefficients(3)
>>> a = lsp2lpc(w)
>>> a
tensor([ 0.0000,  0.8658, -0.0698,  0.0335])

See also

lpc lpc2lsp