pysptk.sptk.lpc2lsp

pysptk.sptk.lpc2lsp(lpc, numsp=128, maxiter=4, eps=1e-06, has_gain=True, loggain=False, otype=0, fs=None)[source]

LPC to LSP

Parameters
lpcarray

LPC

numspint, optional

Number of unit circle. Default is 128.

maxiterint, optional

Maximum number of iteration. Default is 4.

epsfloat, optional

End condition for iteration. Default is 1.0e-6.

has_gainbool, optional

Whether input LPC has gain at the index 0 or not. Default is True.

loggainbool, optional

whether the converted lsp should have loggain or not. Default is False.

fsint, optional

Sampling frequency. Default is None and unused.

otypeint, optional
Output format LSP
  1. normalized frequency (0 ~ pi)

  2. normalized frequency (0 ~ 0.5)

  3. frequency (kHz)

  4. frequency (Hz)

Default is 0.

Returns
lsparray, shape (order + 1)

LSP

Raises
ValueError

if fs is not specified when otype = 2 or 3.