lpc2par#

class diffsptk.LinearPredictiveCoefficientsToParcorCoefficients(lpc_order, gamma=1, warn_type='ignore')[source]#

See this page for details. This module may be slow due to recursive computation.

Parameters:
lpc_orderint >= 0 [scalar]

Order of LPC, \(M\).

gammafloat [-1 <= float <= 1]

Gamma, \(\gamma\).

warn_type[‘ignore’, ‘warn’, ‘exit’]

Behavior for unstable LPC.

forward(a)[source]#

Convert LPC to PARCOR.

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

LPC coefficients.

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

PARCOR coefficients.

Examples

>>> x = diffsptk.nrand(4)
tensor([ 0.7829, -0.2028,  1.6912,  0.1454,  0.4861])
>>> lpc = diffsptk.LPC(3, 5)
>>> a = lpc(x)
>>> a
tensor([ 1.6036,  0.0573, -0.5615, -0.0638])
>>> lpc2par = diffsptk.LinearPredictiveCoefficientsToParcorCoefficients(3)
>>> k = lpc2par(a)
>>> k
tensor([ 1.6036,  0.0491, -0.5601, -0.0638])

See also

lpc par2lpc