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

📄 splitter.h

📁 这是一个从音频信号里提取特征参量的程序
💻 H
字号:
// file: $isip/class/asr/Splitter/Splitter.h// version: $Id: Splitter.h,v 1.6 2002/09/25 00:20:30 alphonso Exp $//// make sure definitions are only made once//#ifndef ISIP_SPLITTER#define ISIP_SPLITTER#ifndef ISIP_STRING#include <String.h>#endif#ifndef ISIP_VECTOR#include <Vector.h>#endif#ifndef ISIP_VECTOR_DOUBLE#include <VectorDouble.h>#endif#ifndef ISIP_FILENAME#include <Filename.h>#endif#ifndef ISIP_SINGLE_LINKED_LIST#include <SingleLinkedList.h>#endif#ifndef ISIP_SDB#include <Sdb.h>#endif#ifndef ISIP_NAME_MAP#include <NameMap.h>#endif#ifndef ISIP_MACHINE_DATABASE#include <MachineDatabase.h>#endif// Splitter: a class used to split a file list and launch jobs on machines//class Splitter {    //--------------------------------------------------------------------------  //  // public constants  //  //--------------------------------------------------------------------------public:    // define the class name  //  static const String CLASS_NAME;  //----------------------------------------  //  // other important constants  //  //----------------------------------------  // define the algorithm choices  //  enum SPLIT_MODE { NONE = 0, SPEED, MEMORY, DEF_SPLIT_MODE = NONE };  // define the static NameMap objects  //  static const NameMap SPLIT_MAP;    //----------------------------------------  //  // i/o related constants  //  //----------------------------------------  static const String DEF_PARAM;  static const String PARAM_SPLIT_MODE;  static const String PARAM_MACHINE_DATABASE;    //----------------------------------------  //  // default values and arguments  //  //----------------------------------------    //---------------------------------------------------------------------------  //  // protected data  //  //---------------------------------------------------------------------------  protected:  // declare the split mode  //  SPLIT_MODE split_mode_d;  // declare the machine database  //  MachineDatabase mdb_d;    // declare a static debug level for all class instantiations  //  static Integral::DEBUG debug_level_d;    // a static memory manager  //  static MemoryManager mgr_d;    //---------------------------------------------------------------------------  //  // required public methods  //  //---------------------------------------------------------------------------public:    // method: name  //  static const String& name() {    return CLASS_NAME;  }    static boolean diagnose(Integral::DEBUG debug_level);    // debug methods  //  boolean debug(const unichar* msg) const;  // method: setDebug  //  static boolean setDebug(Integral::DEBUG arg) {    debug_level_d = arg;    return true;  }    // method: destructor  //  ~Splitter() {    clear();    }  // method: default constructor  //  Splitter();  // method: copy constructor  //  Splitter(const Splitter& arg) {    assign(arg);  }  // method: assign  //  boolean assign(const Splitter& arg);    // method: sofSize  //  long sofSize() const {    return mdb_d.sofSize();  }  // method: read  //  boolean read(Sof& sof, long tag) {    return read(sof, tag, name());  }  // other read methods  //  boolean read(Sof& sof, long tag, const String& name);  boolean readData(Sof& sof, const String& pname = DEF_PARAM,		   long size = SofParser::FULL_OBJECT, boolean param = true,		   boolean nested = false);    // method: write  //  boolean write(Sof& sof, long tag) const {    return write(sof, tag, name());  }  // other write methods  //  boolean write(Sof& sof, long tag, const String& name) const;  boolean writeData(Sof& sof, const String& pname =  DEF_PARAM) const;    // method: eq  //  boolean eq(const Splitter& arg) const;  // method: new  //  static void* operator new(size_t arg) {    return mgr_d.get();  }  // method: new[]  //  static void* operator new[](size_t arg) {    return mgr_d.getBlock(arg);  }  // method: delete  //  static void operator delete(void* arg) {    mgr_d.release(arg);  }  // method: delete[]  //  static void operator delete[](void* arg) {    mgr_d.releaseBlock(arg);  }  // method: setGrowSize  //  static boolean setGrowSize(long arg) {    return mgr_d.setGrow(arg);  }  // method: clear  //  boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);    //---------------------------------------------------------------------------  //  // class-specific public methods  //  //---------------------------------------------------------------------------  // method: getSplitMode  //  SPLIT_MODE getSplitMode() {    return split_mode_d;  }  // method: setSplitMode  //  boolean setSplitMode(SPLIT_MODE arg) {    return (split_mode_d = arg);  }    // method: getMachineDatabase  //  MachineDatabase& getMachineDatabase() {    return mdb_d;  }    // method: setMachineDatabase  //  boolean setMachineDatabase(MachineDatabase& arg) {    return mdb_d.assign(arg);  }    // method to divide the main utterance list  //  boolean divideAndConquer(Filename& identifier_file,			   Filename& machine_list,			   Vector<SingleLinkedList<Filename> >& items);  // method to generate the divided utterance lists  //  boolean createUtterLists(Filename& identifier_file,			   Filename& identifier_list,			   Filename& machine_list,			   Filename& accumulator_list,			   Vector<SingleLinkedList<Filename> >& items,			   Vector<Filename>& identifier_lookup,			   Vector<Machine>& machine_lookup,			   Vector<Filename>& accumulator_lookup);    //---------------------------------------------------------------------------  //  // private methods  //  //---------------------------------------------------------------------------  private:};//end of include file//#endif

⌨️ 快捷键说明

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