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

📄 tp_param_0.cc

📁 这是处理语音信号的程序
💻 CC
📖 第 1 页 / 共 2 页
字号:
	  if (num_wdcut_d < (int_4)0) {	    num_wdcut_d = (int_4)0;	  }	}      }            // read the value for lm scale factor      //      else if (strcmp((char*)tag_str, TP_OP_LMSCALE) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  lm_scale_d = (int_4)atof((char*)tmp3);	}      }            // read the value for word insertion penalty      //      else if (strcmp((char*)tag_str, TP_OP_WORDPENALTY) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  word_penalty_d = (int_4)atof((char*)tmp3);	}      }            // read the function mode      //      else if (strcmp((char*)tag_str, TP_OP_FUNCTION_MODE) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  	  if (strcmp((char*)tmp3, (char*)TP_OP_FORCE_ALIGN) == 0){	    function_mode_d = TP_FORCE_ALIGN_FUNCTION;	  }	  else if (strcmp((char*)tmp3, (char*)TP_OP_LATTICE_RESCORE) == 0){	    function_mode_d = TP_LATTICE_RESCORE_FUNCTION;	  }	  else if (strcmp((char*)tmp3, (char*)TP_OP_NGRAM_DECODE) == 0){	    function_mode_d = TP_NGRAM_DECODE_FUNCTION;	  }	  else if (strcmp((char*)tmp3, (char*)TP_OP_LATTICE_GENERATE) == 0){	    function_mode_d = TP_LATTICE_GENERATE_FUNCTION;	  }	  else if (strcmp((char*)tmp3, (char*)TP_OP_LATTICE_VERIFY) == 0){	    function_mode_d = TP_LATTICE_VERIFY_FUNCTION;	  }	  else if (strcmp((char*)tmp3, (char*)TP_OP_LATTICE_LATTICE) == 0){	    function_mode_d = TP_LATTICE_LATTICE_FUNCTION;	  }	  else if (strcmp((char*)tmp3, (char*)TP_OP_LATTICE_WER) == 0){	    function_mode_d = TP_LATTICE_WER_FUNCTION;	  }	  else {	    fprintf(stdout, "\nError : tp_param_0.cc : function mode error\n\n");	    exit(ISIP_PROTO_ERROR);	  }	}      }            // read the context mode      //      else if (strcmp((char*)tag_str, TP_OP_CONTEXT_MODE) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  if (strcmp((char*)TP_OP_WORD_INTERNAL, (char*)tmp3) == 0){	    context_mode_d = TP_WORD_INTERNAL_MODE;	  }	  else if (strcmp((char*)TP_OP_MONO_PHONE, (char*)tmp3) == 0){	    context_mode_d = TP_MONO_PHONE_MODE;	  }	  else if (strcmp((char*)TP_OP_CROSS_WORD, (char*)tmp3) == 0){	    context_mode_d = TP_CROSS_WORD_MODE;	  }	  else {	    fprintf(stdout, "\nError : tp_param_0.cc : context mode error\n\n");	    exit(ISIP_PROTO_ERROR);	  }	}      }            // read the alignment level mode      //      else if (strcmp((char*)tag_str, TP_OP_ALIGN_MODE) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  if (strcmp((char*)TP_OP_STATE_ALIGN, (char*)tmp3) == 0){	    align_mode_d = TP_STATE_ALIGN_MODE;	  }	  else if (strcmp((char*)TP_OP_MODEL_ALIGN, (char*)tmp3) == 0){	    align_mode_d = TP_MODEL_ALIGN_MODE;	  }	  else if (strcmp((char*)TP_OP_WORD_ALIGN, (char*)tmp3) == 0){	    align_mode_d = TP_WORD_ALIGN_MODE;	  }	  else {	    fprintf(stdout, "\nError : tp_param_0.cc : align mode error\n\n");	    exit(ISIP_PROTO_ERROR);	  }	}      }            // read the input format      //      else if (strcmp((char*)tag_str, TP_OP_INPUT_FORMAT) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  if (strcmp((char*)TP_OP_BINARY, (char*)tmp3) == 0) {	    input_format_d = TP_BINARY_FORMAT;	  }	  else if (strcmp((char*)TP_OP_ASCII, (char*)tmp3) == 0) {	    input_format_d = TP_ASCII_FORMAT;	  }	  else {	    fprintf(stdout, "\nError : tp_param_0.cc : input format error\n\n");	    exit(ISIP_PROTO_ERROR);	  }	}      }      // read the input feature file format      //      else if (strcmp((char*)tag_str, TP_OP_INPUT_FEATURE_FORMAT) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  if (strcmp((char*)TP_OP_HTK, (char*)tmp3) == 0) {	    input_feature_format_d = TP_HTK_FORMAT;	  }	  else {	    input_feature_format_d = TP_ISIP_PROTO_FORMAT;	  }	}      }            // read the delta window      //      else if (strcmp((char*)tag_str, TP_OP_DELTA_WIN) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  delta_win_d = (int_4)atoi((char*)tmp);	}	else {	  input_feature_format_d = TP_DF_DELTA_WIN;	}      }            // read if delta computation required      //      else if (strcmp((char*)tag_str, TP_OP_COMPUTE_DELTA) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  if (strcmp((char*)tmp3, TP_OP_YES) == 0) {	    delta_d = ISIP_TRUE;	  }	  else {	    delta_d = ISIP_FALSE;	  }	}      }            // read if acceleration computation required      //      else if (strcmp((char*)tag_str, TP_OP_COMPUTE_ACC) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  if (strcmp((char*)tmp3, TP_OP_YES) == 0) {	    acc_d = ISIP_TRUE;	  }	  else {	    acc_d = ISIP_FALSE;	  }	}      }      // read frontend parameter file      //      else if (strcmp((char*)tag_str, TP_OP_FRONTEND_PARAMS) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  frontend_params_d = new char_1[strlen((char*)tmp3) + 1];	  strcpy((char*)frontend_params_d, (char*)tmp3); 	  Decoder::expand_filename_cc(frontend_params_d);	}      }      // read compact lattice mode      //      else if (strcmp((char*)tag_str, TP_OP_COMPACT_LATTICE) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  frontend_params_d = new char_1[strlen((char*)tmp3) + 1];	  if (strcmp((char*)tmp3, TP_OP_YES) == 0) {	    compact_lattice_d = ISIP_TRUE;	  }	  else {	    compact_lattice_d = ISIP_FALSE;	  }	}      }            // read nbest pruning parameter: maximum paths      //      else if (strcmp((char*)tag_str, TP_OP_NBEST_MAX_PATH) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  nbest_max_paths_d = (int_4)atof((char*)tmp3);	}      }            // read nbest pruning parameter: beam      //      else if (strcmp((char*)tag_str, TP_OP_NBEST_BEAM) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  nbest_beam_d = (int_4)atof((char*)tmp3);	}      }          // read the segment level mode      //      else if (strcmp((char*)tag_str, TP_OP_SEGMENT_MODE) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  if (strcmp((char*)TP_OP_NONE_SEGMENT, (char*)tmp3) == 0){	    segment_mode_d = TP_NONE_SEGMENT_MODE;	  }	  if (strcmp((char*)TP_OP_MODEL_SEGMENT, (char*)tmp3) == 0){	    segment_mode_d = TP_MODEL_SEGMENT_MODE;	    	  }	  else {	    segment_mode_d = TP_NONE_SEGMENT_MODE;	  }	}      }            // read name of model level segment list      //      else if (strcmp((char*)tag_str, TP_OP_MODEL_SEGMENT_LIST) == 0) {	if (sscanf((char*)tmp, "%s%s%s", tmp1, tmp2, tmp3) == 3) {	  model_segment_file_d = new char_1[strlen((char*)tmp3) + 1];	  strcpy((char*)model_segment_file_d, (char*)tmp3); 	  Decoder::expand_filename_cc(model_segment_file_d);	}      }    }        // otherwise ignore the line    //    else {			      }  }    // delete memory  //  delete [] tmp;  delete [] tag_str;  delete [] tmp1;  delete [] tmp2;  delete [] tmp3;  delete [] tmp4;  delete [] tmp5;    // return gracefully  //  return ISIP_TRUE;}

⌨️ 快捷键说明

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