extf_func_3.cc

来自「这是处理语音信号的程序」· CC 代码 · 共 50 行

CC
50
字号
// file: extract_feature/extf_func_3.cc//// isip include files//#include "extract_feature.h"#include "extract_feature_constants.h"#include <signal_constants.h>// method: func_lifter_cc//// arguments://  float_8* cepstrum_a: (output) the cepstrum//  int_4 num_coeffs_a: (input) number of samples in cepstrum//  float_8 lifter_coeff_a: (input) liftering coefficient//// This method computes the Fourier transform of a signal//logical_1 Extract_feature::func_lifter_cc(float_8* cepstrum_a,					  int_4 num_coeffs_a) {  // implement liftering to smooth the cepstral coefficients  //  //  Rabiner, Juang, Fundamentals of Speech Recognition, pp. 169  //  The HTK Book, pp 68  //  float_8 h = lifter_coeff_d / 2.0;    int_4 n = 1;    if (c0_d) {    n = 0;  }  else    cepstrum_a[0] = 0.0;    for (; n < num_coeffs_a; n++) {    if (n <= lifter_coeff_d) {      cepstrum_a[n] *= (1 + h * sin(M_PI * n / lifter_coeff_d));    }    else {      cepstrum_a[n] = 0.0;    }  }  // exit gracefully  //  return ISIP_TRUE;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?