lpccheck#
- class diffsptk.LinearPredictiveCoefficientsStabilityCheck(lpc_order, margin=1e-16, warn_type='warn')[source]#
See this page for details.
- Parameters:
- lpc_orderint >= 0
The order of the LPC, \(M\).
- marginfloat in (0, 1)
The margin to guarantee the stability of LPC.
- warn_type[‘ignore’, ‘warn’, ‘exit’]
The warning type.
- forward(a)[source]#
Check the stability of the input LPC coefficients.
- Parameters:
- aTensor [shape=(…, M+1)]
The input LPC coefficients.
- Returns:
- outTensor [shape=(…, M+1)]
The 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)]
The input LPC coefficients.
- marginfloat in (0, 1)
The margin to guarantee the stability of LPC.
- warn_type[‘ignore’, ‘warn’, ‘exit’]
The warning type.
- Returns:
- outTensor [shape=(…, M+1)]
The modified LPC coefficients.