pysptk.sptk.lsp2lpc

pysptk.sptk.lsp2lpc(lsp, has_gain=True, loggain=False, fs=None, itype=0)[source]

LSP to LPC

Parameters
lpcarray

LPC

has_gainbool, optional

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

loggainbool, optional

If True, it’s assumed that input LPC has loggain and convert it to linear gain. Default is False.

fsint, optional

Sampling frequency. Default is None and unused.

itypeint, optional
Input LPC format
  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) if has_gain else (order)

LPC

Raises
ValueError

if fs is not specified when itype = 2 or 3. if loggain and not has_gain.