lsp2lpc#

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

See this page for details.

Parameters:
lpc_orderint >= 0

Order of LPC, \(M\).

log_gainbool

If True, assume input gain is in log scale.

forward(w)[source]#

Convert LSP to LPC.

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

LSP frequencies in radians.

Returns:
outTensor [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])
diffsptk.functional.lsp2lpc(w, log_gain=False)[source]#

Convert LSP to LPC.

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

LSP frequencies in radians.

log_gainbool

If True, assume input gain is in log scale.

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

LPC coefficients.

See also

lpc lpc2lsp