⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssrch_16.cc

📁 这是一个从音频信号里提取特征参量的程序
💻 CC
字号:
// file: $isip/class/search/StackSearch/ssrch_16.cc// version: $Id: ssrch_16.cc,v 1.4 2002/09/06 21:46:31 jelinek Exp $//// isip include files//#include "StackSearch.h"// method: decode//// arguments://  FrontEnd& fe: (input) front-end providing data//  long num_frames: (input) number of frames to decode//// return: logical error status//// this is the decoding wrapper method for the front-end input//boolean StackSearch::decode(FrontEnd& fe_a, long num_frames_a) {  long num_frames_available = fe_a.getNumFrames();  // set the number of frames  //  if (num_frames_a == ALL_FRAMES) {        // decode all available data    //    num_frames_d = num_frames_available;  }  else {        // decode only specified number of frames    //    if (num_frames_a > num_frames_available) {            // output warning      //      return Error::handle(name(),			   L"decode - number of frames to decode exceeds the number of features available from front end",			   Error::ARG, __FILE__, __LINE__, Error::WARNING);    }    else {      num_frames_d = num_frames_a;    }  }  // initialize required number of features  //  features_d.setLength(num_frames_d);  for (long curr_frame = 0; curr_frame < num_frames_d; curr_frame++) {        // assign features from the front end    //    fe_a.getVector(features_d(curr_frame), 0, curr_frame);  }  // call the core decoding method common for both feature and front  // end input data  //  decode();    // exit gracefully  //  return true;}// method: decode//// arguments://  Vector<VectorFloat>& data: (input) feature data//  long num_frames: (input) number of frames to decode//// return: logical error status//// this is the decoding wrapper method for the features input//boolean StackSearch::decode(Vector<VectorFloat>& data_a, long num_frames_a) {  long num_frames_available = data_a.length();  // set the number of frames  //  if (num_frames_a == ALL_FRAMES) {        // decode all available data    //    num_frames_d = num_frames_available;  }  else {        // decode only specified number of frames    //    if (num_frames_a > num_frames_available) {            // output warning      //      return Error::handle(name(),			   L"decode - number of frames to decode exceeds the number of features available from the input feature vector",			   Error::ARG, __FILE__, __LINE__, Error::WARNING);    }    else {      num_frames_d = num_frames_a;    }  }  // initialize required number of features  //  features_d.setLength(num_frames_d);  for (long curr_frame = 0; curr_frame < num_frames_d; curr_frame++) {        // assign features from the input feature vector    //    features_d(curr_frame) = data_a(curr_frame);  }  // call the core decoding method common for both feature and front  // end input data  //  decode();    // exit gracefully  //  return true;}

⌨️ 快捷键说明

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