lpccheck#
- class diffsptk.LinearPredictiveCoefficientsStabilityCheck(lpc_order, margin=1e-16, warn_type='warn')[source]#
See this page for details.
- Parameters:
- lpc_orderint >= 0 [scalar]
Order of LPC, \(M\).
- margin[0 < float < 1]
Margin.
- warn_type[‘ignore’, ‘warn’, ‘exit’]
Behavior for unstable LPC.
- forward(a1)[source]#
Check stability of LPC.
- Parameters:
- a1Tensor [shape=(…, M+1)]
LPC coefficients.
- Returns:
- a2Tensor [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])