lpccheck

Functions

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

lpccheck [ option ] [ infile ]

  • -m int

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

  • -e int

    • warning type

      • 0 no warning

      • 1 output index

      • 2 output index and exit immediately

  • -r double

    • margin \((0 < \delta < 1)\)

  • -x bool

    • perform modification

  • infile str

    • double-type LPC coefficients

  • stdout

    • double-type modified LPC coefficients

Parameters
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns

0 on success, 1 on failure.

See also

lpc2par lpc poledf

class sptk::LinearPredictiveCoefficientsStabilityCheck

Check stability of linear predictive coefficients and modify them.

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

\[ \begin{array}{cccc} K, & a(1), & \ldots, & a(M), \end{array} \]
and the output is the modified \(M\)-th order LPC:
\[ \begin{array}{cccc} K, & a'(1), & \ldots, & a'(M). \end{array} \]
The LPC \(a(\cdot)\) are stable if the PARCOR coefficients \(k(\cdot)\) satisfy the following condition:
\[ k(m) \le 1.0 - \delta \]
where \(\delta\) is a small positive value.

Public Functions

LinearPredictiveCoefficientsStabilityCheck(int num_order, double margin)
Parameters
  • num_order[in] Order of LPC, \(M\).

  • margin[in] Margin in PARCOR domain, \(\delta\).

inline int GetNumOrder() const
Returns

Order of coefficients.

inline double GetMargin() const
Returns

Margin.

inline bool IsValid() const
Returns

True if this object is valid.

bool Run(const std::vector<double> &linear_predictive_coefficients, std::vector<double> *modified_linear_predictive_coefficients, bool *is_stable, LinearPredictiveCoefficientsStabilityCheck::Buffer *buffer) const
Parameters
  • linear_predictive_coefficients[in] \(M\)-th order LPC.

  • modified_linear_predictive_coefficients[out] Modified \(M\)-th order LPC (optional).

  • is_stable[out] True if the given coefficients are stable.

  • buffer[out] Buffer.

Returns

True on success, false on failure.

bool Run(std::vector<double> *input_and_output, bool *is_stable, LinearPredictiveCoefficientsStabilityCheck::Buffer *buffer) const
Parameters
  • input_and_output[inout] \(M\)-th order coefficients.

  • is_stable[out] True if the given coefficients are stable.

  • buffer[out] Buffer.

Returns

True on success, false on failure.

class Buffer

Buffer for LinearPredictiveCoefficientsStabilityCheck.