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

📄 hiddenmarkovmodel.h

📁 这是一个从音频信号里提取特征参量的程序
💻 H
📖 第 1 页 / 共 2 页
字号:
  //---------------------------------------------------------------------------  //  // class-specific public methods  //  set methods  //  //---------------------------------------------------------------------------    // method: getStream  //  boolean getStream() {    return stream_d;  }  // method: setStream  //  boolean setStream(boolean arg) {    return (stream_d = arg);  }  // method: getAlgorithm  //  ALGORITHM getAlgorithm() {    return algorithm_d;  }  // method: setAlgorithm  //  boolean setAlgorithm(ALGORITHM arg) {    return (algorithm_d = arg);  }  // method: getImplementation  //  IMPLEMENTATION getImplementation() {    return implementation_d;  }    // method: setImplementation  //  boolean setImplementation(IMPLEMENTATION arg) {    return (implementation_d = arg);  }  // method: getContextMode  //  CONTEXT_MODE getContextMode() {    return context_mode_d;  }    // method: setContextMode  //  boolean setContextMode(CONTEXT_MODE arg) {    return (context_mode_d = arg);  }    // method: setFunctionMode  //  boolean setFunctionMode(const String& arg);    // method: getFunctionMode  //  FUNCTION_MODE getFunctionMode() {    return function_mode_d;  }  // method: setOutputMode  //  boolean setOutputMode(const String& arg);    // method: getOutputMode  //  OUTPUT_MODE getOutputMode() {    return output_mode_d;  }  // method: setUpdateMode  //  boolean setUpdateMode(const String& arg);    // method: getUpdateMode  //  UPDATE_MODE getUpdateMode() {    return update_mode_d;  }  // method: setOutputFormat  //  boolean setOutputFormat(const String& arg);    // method: setOutputLevelString  //  boolean setOutputLevelString(const String& arg){    return output_levels_str_d.assign(arg);  }  // method: setUpdateLevelString  //  boolean setUpdateLevelString(const String& arg){    return update_levels_str_d.assign(arg);  }      // method: getOutputFormat  //  OUTPUT_FORMAT getOutputFormat() {    return output_format_d;  }  // method: setOutputType  //  boolean setOutputType(const String& arg);    // method: getOutputType  //  OUTPUT_TYPE getOutputType() {    return output_type_d;  }    // method: getParamFile  //  Filename& getParamFile() {    return param_file_d;  }    // method: setParamFile  //  boolean setParamFile(const Filename& arg) {    return param_file_d.assign(arg);  }  // method: getLanguageModelFile  //  Filename& getLanguageModelFile() {    return lm_model_file_d;  }    // method: setLanguageModelFile  //  boolean setLanguageModelFile(const Filename& arg) {    return lm_model_file_d.assign(arg);  }      // method: getAcousticModelFile  //  Filename& getAcousticModelFile() {    return ac_model_file_d;  }    // method: setAcousticModelFile  //  boolean setAcousticModelFile(const Filename& arg) {    return ac_model_file_d.assign(arg);  }  // method: getConfigFile  //  Filename& getConfigFile() {    return cnfg_file_d;  }    // method: setConfigFile  //  boolean setConfigFile(const Filename& arg) {    return cnfg_file_d.assign(arg);  }  // method: getFrontEndFile  //  Filename& getFrontEndFile() {    return fend_file_d;  }    // method: setFrontEndFile  //  boolean setFrontEndFile(const Filename& arg) {    return fend_file_d.assign(arg);  }  // method: getLanguageModelUpdateFile  //  Filename& getLanguageModelUpdateFile() {    return update_lm_model_file_d;  }    // method: setLanguageModelUpdateFile  //  boolean setLanguageModelUpdateFile(const Filename& arg) {    return update_lm_model_file_d.assign(arg);  }      // method: getAcousticModelUpdateFile  //  Filename& getAcousticModelUpdateFile() {    return update_ac_model_file_d;  }    // method: setAcousticModelUpdateFile  //  boolean setAcousticModelUpdateFile(const Filename& arg) {    return update_ac_model_file_d.assign(arg);  }  // method: getAccumulatorFile  //  Filename& getAccumulatorFile() {    return accum_file_d;  }  // method: setAccumulatorFile  //  boolean setAccumulatorFile(const Filename& arg) {    return accum_file_d.assign(arg);  }    // method: getAccumulatorList  //  Filename& getAccumulatorList() {    return accum_list_d;  }    // method: setAccumulatorList  //  boolean setAccumulatorList(const Filename& arg) {    return accum_list_d.assign(arg);  }    // method: getOutputFile  //  Filename& getOutputFile() {    return output_file_d;  }    // method: setOutputFile  //  boolean setOutputFile(const Filename& arg) {    return output_file_d.assign(arg);  }    // method: getOutputList  //  Filename& getOutputList() {    return output_list_d;  }    // method: setOutputList  //  boolean setOutputList(const Filename& arg) {    return output_list_d.assign(arg);  }  // method: getContextList  //  Filename& getContextList() {    return context_list_d;  }    // method: setContextList  //  boolean setContextList(const Filename& arg) {    return context_list_d.assign(arg);  }  // method: getVarianceFloorFile  //  Filename& getVarianceFloorFile() {    return variance_floor_file_d;  }    // method: setVarianceFloorFile  //  boolean setVarianceFloorFile(const Filename& arg) {    return variance_floor_file_d.assign(arg);  }  // method: getVarianceFloor  //    float getVarianceFloor() {    return (float)variance_floor_d;  }    // method: setVarianceFloor  //  boolean setVarianceFloor(float arg) {    return variance_floor_d.assign(arg);  }  // method: getBetaThreshold  //    float getBetaThreshold() {    return (float)beta_threshold_d;  }    // method: setBetaThreshold  //  boolean setBetaThreshold(float arg) {    return beta_threshold_d.assign(arg);  }  // method: getInitialLevel  //    long getInitialLevel() {    return (long)initial_level_d;  }    // method: setInitialLevel  //  boolean setInitialLevel(long arg) {    return initial_level_d.assign(arg);  }    // method: getContextLevel  //    long getContextLevel() {    return (long)context_level_d;  }    // method: setContextLevel  //  boolean setContextLevel(long arg) {    return context_level_d.assign(arg);  }    // method: getContextOrder  //    long getContextOrder() {    return (long)context_order_d;  }    // method: setContextOrder  //  boolean setContextOrder(long arg) {    return context_order_d.assign(arg);  }      // method: getNumLevels  //    long getNumLevels() {    return (long)num_levels_d;  }    // method: setNumLevels  //  boolean setNumLevels(long arg) {    return num_levels_d.assign(arg);  }  // method: getNumMixtures  //    long getNumMixtures() {    return (long)num_mixtures_d;  }    // method: setNumMixtures  //  boolean setNumMixtures(long arg) {    return num_mixtures_d.assign(arg);  }    // method: getNumIterations  //    long getNumIterations() {    return (long)num_iterations_d;  }    // method: setNumIterations  //  boolean setNumIterations(long arg) {    return num_iterations_d.assign(arg);  }   // method: getMinProbabilityDeviance  //    float getMinProbabilityDeviance() {    return (float)min_mpd_d;  }    // method: setMinProbabilityDeviance  //  boolean setMinProbabilityDeviance(float arg) {    return min_mpd_d.assign(arg);  }   // method: getMinOccupancy  //    float getMinOccupancy() {    return (float)min_occupancy_d;  }    // method: setMinOccupancy  //  boolean setMinOccupancy(float arg) {    return min_occupancy_d.assign(arg);  }   // method: getMinModelCount  //    long getMinModelCount() {    return (long)min_model_count_d;  }    // method: setMinModelCount  //  boolean setMinModelCount(long arg) {    return min_model_count_d.assign(arg);  }     // method: getSplitThreshold  //  float getSplitThreshold() {    return (float)phonetic_dt_split_threshold_d;  }  // method: setSplitThreshold  //  boolean setSplitThreshold(float split_threshold) {    phonetic_dt_split_threshold_d = split_threshold;    return true;    }  // method: getMergeThreshold  //  float getMergeThreshold(float merge_threshold) {    return (float)phonetic_dt_merge_threshold_d;  }  // method: setMergeThreshold  //  boolean setMergeThreshold(float merge_threshold) {    phonetic_dt_merge_threshold_d = merge_threshold;    return true;    }  // method: getNumOccThreshold  //  float getNumOccThreshold() {    return (float)phonetic_dt_num_occ_threshold_d;  }  // method: setNumOccThreshold  //  boolean setNumOccThreshold(float num_occ_threshold) {    phonetic_dt_num_occ_threshold_d = num_occ_threshold;    return true;    }  // method: getDecisionTreeFile  //  Filename& getDecisionTreeFile() {    return phonetic_dt_file_d;  }  // method: setDecisionTreeFile  //  boolean setDecisionTreeFile(const Filename& arg) {    return phonetic_dt_file_d.assign(arg);  }  // method: setQuesAnserFile  //  boolean setQuesAnswerFile(const Filename& arg) {    return ques_ans_file_d.assign(arg);  }  // method: getQuesAnserFile  //  Filename& getQuesAnswerFile() {    return ques_ans_file_d;  }  // method: setVerbosity  //  boolean setVerbosity(Integral::DEBUG verbosity) {    verbosity_d = verbosity;    return true;  }  // method: setVerify  //  boolean setVerify(boolean verify) {    verify_d = verify;    return true;    }  //---------------------------------------------------------------------------  //  // class-specific public methods:  //  computational methods  //  //---------------------------------------------------------------------------  // run methods  //  boolean run(Sdb& sdb);  boolean nonLinearDecoder(Sdb& sdb);  boolean grammarDecoder(Sdb& sdb);  boolean networkDecoder(Sdb& sdb);      boolean linearDecoder(Sdb& sdb);  boolean parameterTying(Sdb& sdb);    // parameter check methods  //  boolean checkParams();    // load and store methods  //  boolean load();  boolean store();    // method to compute the utterance probability  //  boolean computeUtterProb(double& utter_prob);    // method to initialize the models  //  boolean initialize(Sdb& sdb);    // method to extract all feature vectors from file  //  boolean extractFeatures(Vector<VectorFloat>& data);  // method sets up a mapping table that assigns a unique index to each vertex  //  boolean initializeMappingTable();    // method to accumulate statitics during training  //  boolean loadAccumulators();  boolean storeAccumulators();    boolean accumulate(double utter_prob, Vector<VectorFloat>& data);  boolean accumulateStateTransitions(double utter_prob,				     Vector<VectorFloat>& data);  boolean accumulateStatisticalModels(double utter_prob,				      Vector<VectorFloat>& data);      // method to update the models using the accumulated statistics  //  boolean update();  boolean updateStateTransitions(SearchLevel& search_level);  boolean updateStatisticalModels(SearchLevel& search_level);    // method to adapt the models using the accumulated statistics  //  boolean adapt(Vector<StatisticalModel>& stat_models_a);  // method to load and initialize the transcriptions  //  boolean insertNonSpeechSymbols(Vector<SearchSymbol>& symbols,				 DiGraph<SearchNode>& graph,				 SearchLevel& level);  boolean initTranscription(String& id, long arg);  // method related to transcriptions  //  boolean agToDigraph(DiGraph<SearchNode>& digraph, AnnotationGraph& ag,		      long& channel, float& start_time, float& stop_time,		      boolean& is_conversation);    boolean agToSegment(AnnotationGraph& ag, long& channel,		      float& start_time, float& stop_time);    // method to reset the accumulators  //  boolean resetAccumulators();    // method for parameter-tying in train mode  //  boolean parameterTyingTrain();    // method for parameter-tying in test mode  //  boolean parameterTyingTest();    // method to accumulate occupancies during parameter-tying  //  boolean loadOccupancies();  // method to create annotation graph from trace  //  boolean createAnnotationGraph(AnnotationGraph& anno,				DoubleLinkedList<Trace>& trace_path);  // method to create annotation graph from instance  //  boolean createAnnotationGraph(AnnotationGraph& anno,				DoubleLinkedList<Instance>& instance_path);  // method to prune the annotation graph according to the output levels  //  boolean pruneAnnotationGraph(AnnotationGraph& anno);  // create statistical models  //  boolean HiddenMarkovModel::createStatisticalModels();  //---------------------------------------------------------------------------  //  // private methods  //  //---------------------------------------------------------------------------  private:  // set methods  //  boolean parseLevels(const String& output_levels_str,			  VectorByte& output_levels);  GraphArc<SearchNode>* getSearchArc(GraphVertex<SearchNode>* src,				     GraphVertex<SearchNode>* dst);    boolean insert(VectorByte& src, long start_index, long num_elem, byte mode);  boolean createContexts(Vector<SearchSymbol>& symbols, long order,			 Vector<SearchSymbol>& all_contexts);  boolean appendContexts(Vector<SearchSymbol>& symbols,			 SearchSymbol symbol, long curr_order, long order,			 Vector<SearchSymbol>& all_contexts);  // method to compute partial contribution of one Gaussian model to  // global adaptation  //  boolean adaptPart(Vector<MatrixDouble>& g_a,		    MatrixFloat& z_a,		    GaussianModel& gm_a);};//end of include file//#endif

⌨️ 快捷键说明

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