lpccheck#

class diffsptk.LinearPredictiveCoefficientsStabilityCheck(lpc_order, margin=1e-16, warn_type='warn')[source]#

See this page for details.

Parameters:
lpc_orderint >= 0

Order of LPC, \(M\).

marginfloat in (0, 1)

Margin for stability.

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

Warning type.

forward(a)[source]#

Check stability of LPC.

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

LPC coefficients.

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

Modified LPC coefficients.

Examples

>>> x = diffsptk.nrand(4)
tensor([-0.9966, -0.2970, -0.2173,  0.0594,  0.5831])
>>> lpc = diffsptk.LPC(3, 5)
>>> a = lpc(x)
>>> a
tensor([ 1.1528, -0.2613, -0.0274,  0.1778])
>>> lpccheck = diffsptk.LinearPredictiveCoefficientsStabilityCheck(3)
>>> a2 = lpccheck(a)
tensor([ 1.1528, -0.2613, -0.0274,  0.1778])
diffsptk.functional.lpccheck(a, margin=1e-16, warn_type='warn')[source]#

Check stability of LPC coefficients.

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

LPC coefficients.

marginfloat in (0, 1)

Margin for stability.

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

Warning type.

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

Modified LPC coefficients.

See also

lpc lpc2par par2lpc