c2acr
Functions
-
int main(int argc, char *argv[])
c2acr [ option ] [ infile ]
-m int
order of cepstral coefficients
-M int
order of autocorrelation coefficients
-l int
FFT length
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.
-
class CepstrumToAutocorrelation
Convert cepstral coefficients to autocorrelation coefficients.
The input is the
-th order cepstral coefficients: -th order autocorrelation coefficients: is a signal, and denote the DFT and the inverse DFT, respectively. From the definition, the relation between the cepstrum and the autocorrelation can be derived as follows:Public Functions
-
CepstrumToAutocorrelation(int num_input_order, int num_output_order, int fft_length)
- Parameters:
num_input_order – [in] Order of cepstral coefficients,
.num_output_order – [in] Order of autocorrelation coefficients,
.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]
-th order cesptral coefficients.autocorrelation – [out]
-th order autocorrelation coefficients.buffer – [out] Buffer.
- Returns:
True on success, false on failure.
-
class Buffer
Buffer for CepstrumToAutocorrelation class.
-
CepstrumToAutocorrelation(int num_input_order, int num_output_order, int fft_length)