lspcheck#
- class diffsptk.LineSpectralPairsStabilityCheck(lsp_order, rate=0, n_iter=1, warn_type='warn')[source]#
See this page for details.
- Parameters:
- lsp_orderint >= 0
The order of the LSP, \(M\).
- ratefloat in [0, 1]
The rate of distance between two adjacent LSPs.
- n_iterint >= 0
The number of iterations for the modification.
- warn_type[‘ignore’, ‘warn’, ‘exit’]
The warning type.
- forward(w)[source]#
Check the stability of the input LSP coefficients.
- Parameters:
- wTensor [shape=(…, M+1)]
The input LSP coefficients in radians.
- Returns:
- outTensor [shape=(…, M+1)]
The modified LSP coefficients in radians.
Examples
>>> w1 = torch.tensor([0, 0, 1]) * torch.pi >>> lspcheck = diffsptk.LineSpectralPairsStabilityCheck(2, rate=0.01) >>> w2 = lspcheck(w1) >>> w2 tensor([0.0000, 0.0105, 3.1311])
- diffsptk.functional.lspcheck(w, rate=0, n_iter=1, warn_type='warn')[source]#
Check the stability of the input LSP coefficients.
- Parameters:
- wTensor [shape=(…, M+1)]
The input LSP coefficients in radians.
- ratefloat in [0, 1]
The rate of distance between two adjacent LSPs.
- n_iterint >= 0
The number of iterations for the modification.
- warn_type[‘ignore’, ‘warn’, ‘exit’]
The warning type.
- Returns:
- outTensor [shape=(…, M+1)]
The modified LSP frequencies.
See also