poledf

Functions

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

poledf [ option ] afile [ infile ]

  • -m int

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

  • -p int

    • frame period \((1 \le P)\)

  • -i int

    • interpolation period \((0 \le I \le P/2)\)

  • -t bool

    • transpose filter

  • -k bool

    • filtering without gain

  • afile str

    • double-type LPC coefficients

  • infile str

    • double-type input sequence

  • stdout

    • double-type output sequence

In the below example, an exciation signal generated from pitch information is passed through the standard form synthesis filter built from LPC coefficients.

excite < data.pitch | poledf data.lpc > data.syn

Parameters
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns

0 on success, 1 on failure.

See also

acorr lpc

class sptk::AllPoleDigitalFilter

Apply all-pole digital filter for speech synthesis to signals.

The transfer function \(H(z)\) of an all-pole filter is

\[ H(z) = \frac{K}{1 + \displaystyle\sum_{m=1}^M a(m)z^{-m}}, \]
where \(M\) is the order of filter and \(K\) is the gain.

Given the \(M\)-th order filter coefficients,

\[ \begin{array}{cccc} K, & a(1), & \ldots, & a(M), \end{array} \]
an output signal is obtained by applying \(H(z)\) to an input signal in time domain.

Public Functions

AllPoleDigitalFilter(int num_filter_order, bool transposition)
Parameters
  • num_filter_order[in] Order of filter coefficients, \(M\).

  • transposition[in] If true, use transposed form filter.

inline int GetNumFilterOrder() const
Returns

Order of coefficients.

inline bool IsTransposition() const
Returns

True if transposed form is used.

inline bool IsValid() const
Returns

True if this object is valid.

bool Run(const std::vector<double> &filter_coefficients, double filter_input, double *filter_output, AllPoleDigitalFilter::Buffer *buffer) const
Parameters
  • filter_coefficients[in] \(M\)-th order LPC coefficients.

  • filter_input[in] Input signal.

  • filter_output[out] Output signal.

  • buffer[inout] Buffer.

Returns

True on success, false on failure.

bool Run(const std::vector<double> &filter_coefficients, double *input_and_output, AllPoleDigitalFilter::Buffer *buffer) const
Parameters
  • filter_coefficients[in] \(M\)-th order LPC coefficients.

  • input_and_output[inout] Input/output signal.

  • buffer[inout] Buffer.

Returns

True on success, false on failure.

class Buffer

Buffer for AllPoleDigitalFilter class.