lar2par

Functions

int main(int argc, char *argv[])

lar2par [ option ] [ infile ]

  • -m int

    • order of coefficients \((0 \le M)\)

  • infile str

    • double-type LAR coefficients

  • stdout

    • double-type PARCOR coefficients

The below example extracts LAR coefficients from data.d

frame < data.d | window | lpc | lpc2par | par2lar > data.lar
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

par2lar

class LogAreaRatioToParcorCoefficients

Convert LAR coefficients to PARCOR coefficients.

The input is the \(M\)-th order LAR coefficients:

\[ \begin{array}{cccc} K, & g(1), & \ldots, & g(M), \end{array} \]
and the output is the \(M\)-th order PARCOR coefficients:
\[ \begin{array}{cccc} K, & k(1), & \ldots, & k(M), \end{array} \]
where \(K\) is the gain. The conversion is performed by
\[\begin{split}\begin{eqnarray} k(m) &=& \frac{e^{g(m)} - 1}{e^{g(m)} + 1}\\ &=& \tanh(g(m)/2). \end{eqnarray}\end{split}\]

Public Functions

explicit LogAreaRatioToParcorCoefficients(int num_order)
Parameters:

num_order[in] Order of coefficients.

inline int GetNumOrder() const
Returns:

Order of coefficients.

inline bool IsValid() const
Returns:

True if this object is valid.

bool Run(const std::vector<double> &log_area_ratio, std::vector<double> *parcor_coefficients) const
Parameters:
  • log_area_ratio[in] \(M\)-th order LAR coefficients.

  • parcor_coefficients[out] \(M\)-th order PARCOR coefficients.

Returns:

True on success, false on failure.

bool Run(std::vector<double> *input_and_output) const
Parameters:

input_and_output[inout] \(M\)-th order coefficients.

Returns:

True on success, false on failure.