c2acr

Functions

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

c2acr [ option ] [ infile ]

  • -m int

    • order of cepstral coefficients (0M1<L)

  • -M int

    • order of autocorrelation coefficients (0M2<L)

  • -l int

    • FFT length (2L)

  • infile str

    • double-type cepstral coefficients

  • stdout

    • double-type autocorrelation coefficients

The following example converts the 30-th order cepstral coefficients in data.cep into the 15-th order LPC coefficients.

c2acr -m 30 -M 15 < data.cep | levdur -m 15 > data.lpc
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

lpc2c acorr

class CepstrumToAutocorrelation

Convert cepstral coefficients to autocorrelation coefficients.

The input is the M1-th order cepstral coefficients:

c(0),c(1),,c(M1),
and the output is the M2-th order autocorrelation coefficients:
r(0),r(1),,r(M2),
The definition of the cepstrum can be represented as
c(m)=F1{log|F{x(m)}|},
where x(m) is a signal, F1 and F denote the DFT and the inverse DFT, respectively. From the definition, the relation between the cepstrum and the autocorrelation can be derived as follows:
c(m)=F1{12log|X(ω)|2}=F1{12logF{r(m)}},
where the Wiener–Khinchin theorem is used. Thus
r(m)=F1{exp(2F{c(m)})}.
Note that the imaginary part is zero.

Public Functions

CepstrumToAutocorrelation(int num_input_order, int num_output_order, int fft_length)
Parameters:
  • num_input_order[in] Order of cepstral coefficients, M1.

  • num_output_order[in] Order of autocorrelation coefficients, M2.

  • fft_length[in] FFT length.

inline int GetNumInputOrder() const
Returns:

Order of cepstral coefficients.

inline int GetNumOutputOrder() const
Returns:

Order of autocorrelation coefficients.

inline int GetFftLength() const
Returns:

FFT length.

inline bool IsValid() const
Returns:

True if this object is valid.

bool Run(const std::vector<double> &cepstrum, std::vector<double> *autocorrelation, CepstrumToAutocorrelation::Buffer *buffer) const
Parameters:
  • cepstrum[in] M1-th order cesptral coefficients.

  • autocorrelation[out] M2-th order autocorrelation coefficients.

  • buffer[out] Buffer.

Returns:

True on success, false on failure.

class Buffer

Buffer for CepstrumToAutocorrelation class.