亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? gms.c

?? about sound recognition.i want to downlod
?? C
字號:
/** * @file   gms.c * @author Akinobu LEE * @date   Thu Feb 17 14:52:18 2005 *  * <JA> * @brief  Gaussian Mixture Selection による覺輪銻刨紛換 * * 悸劉數(shù)恕についてはソ〖ス柒のコメントをご枉くださいˉ * </JA> *  * <EN> * @brief  Calculate state probability with Gaussian Mixture Selection * * See the comments in the source for details about implementation. * </EN> *  * $Revision: 1.4 $ *  *//* * Copyright (c) 1991-2006 Kawahara Lab., Kyoto University * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology * Copyright (c) 2005-2006 Julius project team, Nagoya Institute of Technology * All rights reserved *//*  Implementation of Gaussian Mixture Selection (old doc...)    It is called from gs_calc_selected_mixture_and_cache_{safe,heu,beam} in  the first pass for each frame.  It calculates all GS HMM outprob for  given input frame and get the N-best GS HMM states. Then,       for the selected (N-best) states:           calculate the corresponding codebook,           and set fallback_score[t][book] to LOG_ZERO.       else:           set fallback_score[t][book] to the GS HMM outprob.  Later, when calculating state outprobs, the fallback_score[t][book]  is consulted and,       if fallback_score[t][book] == LOG_ZERO:           it means it has been selected, so calculate the outprob with           the corresponding codebook and its weights.       else:           it means it was pruned, so use the fallback_score[t][book]           as its outprob.             For triphone, GS HMMs should be assigned to each state.  So the fallback_score[][] is kept according to the GS state ID,  and corresponding GS HMM state id for each triphone state id should be  kept beforehand.  GS HMM Calculation:       for the selected (N-best) GS HMM states:           set fallback_score[t][gs_stateid] to LOG_ZERO.       else:           set fallback_score[t][gs_stateid] to the GS HMM outprob.  triphone HMM probabilities are assigned as:       if fallback_score[t][state2gs[tri_stateid]] == LOG_ZERO:           it has been selected, so calculate the original outprob.       else:           as it was pruned, re-use the fallback_score[t][stateid]           as its outprob.*/#include <sent/stddefs.h>#include <sent/htk_hmm.h>#include <sent/htk_param.h>#include <sent/hmm.h>#include <sent/gprune.h>#include "globalvars.h"#undef NORMALIZE_GS_SCORE	/* normalize score (ad-hoc) */  /* GS HMMs must be defined at STATE level using "~s NAME" macro,     where NAMES are like "i:4m", "s2m", etc. *//* variables for GMS */static int my_nbest;		///< Number of states to be selectedstatic int allocframenum;	///< Allocated number of frame for storing fallback scores per frame/* GMS info */static GS_SET *gsset;		///< Set of GS statesstatic int gsset_num;		///< Num of abovestatic int *state2gs; ///< Mapping from triphone state id to gs id/* results */static boolean *is_selected;	///< TRUE if the frame is already selectedstatic LOGPROB **fallback_score = NULL; ///< [t][gssetid], LOG_ZERO if selected/* for calculation */static int *gsindex;		///< Index bufferstatic LOGPROB *t_fs;		///< Current fallback_score/**  * Register all state defs in GS HMM to GS_SET. *  */static voidbuild_gsset(){  HTK_HMM_State *st;  /* allocate */  gsset = (GS_SET *)mymalloc(sizeof(GS_SET) * OP_gshmm->totalstatenum);  gsset_num = OP_gshmm->totalstatenum;  /* make ID */  for(st = OP_gshmm->ststart; st; st=st->next) {    gsset[st->id].state = st;  }}/** * Free gsset. *  */static voidfree_gsset(){  free(gsset);}#define MAXHMMNAMELEN 40	///< Assumed maximum length of %HMM name/**  * Build the correspondence from GS states to triphone states. *  * @return TRUE on success, FALSE on failure. */static booleanbuild_state2gs(){  HTK_HMM_Data *dt;  HTK_HMM_State *st, *cr;  int i;  char gstr[MAXHMMNAMELEN], cbuf[MAXHMMNAMELEN];  boolean ok_p = TRUE;  /* initialize */  state2gs = (int *)mymalloc(sizeof(int) * OP_hmminfo->totalstatenum);  for(i=0;i<OP_hmminfo->totalstatenum;i++) state2gs[i] = -1;  /* parse through all HMM macro to register their state */  for(dt = OP_hmminfo->start; dt; dt=dt->next) {    if (strlen(dt->name) >= MAXHMMNAMELEN - 2) {      j_printerr("Error: too long hmm name (>%d): \"%s\"\n",		 MAXHMMNAMELEN-3, dt->name);      ok_p = FALSE;      continue;    }    for(i=1;i<dt->state_num-1;i++) { /* for all state */      st = dt->s[i];      /* skip if already assigned */      if (state2gs[st->id] != -1) continue;      /* set corresponding gshmm name */      sprintf(gstr, "%s%dm", center_name(dt->name, cbuf), i + 1);      /* look up the state in OP_gshmm */      if ((cr = state_lookup(OP_gshmm, gstr)) == NULL) {	j_printerr("Error: GS HMM \"%s\" not defined\n", gstr);	ok_p = FALSE;	continue;      }      /* store its ID */      state2gs[st->id] = cr->id;    }  }#ifdef PARANOIA  {    HTK_HMM_State *st;    for(st=OP_hmminfo->ststart; st; st=st->next) {      printf("%s -> %s\n", (st->name == NULL) ? "(NULL)" : st->name,	     (gsset[state2gs[st->id]].state)->name);    }  }#endif  return ok_p;}/** * free state2gs. *  */static voidfree_state2gs(){  free(state2gs);}/* sort to find N-best states */#define SD(A) gsindex[A-1]	///< Index macro for heap sort#define SCOPY(D,S) D = S	///< Element copy macro for heap sort#define SVAL(A) (t_fs[gsindex[A-1]]) ///< Element evaluation macro for heap sort#define STVAL (t_fs[s]) ///< Element current value macro for heap sort/**  * Heap sort of @a gsindex to determine which model gets N best likelihoods. *  * @param neednum [in] needed number N * @param totalnum [in] total number of data */static voidsort_gsindex_upward(int neednum, int totalnum){  int n,root,child,parent;  int s;  for (root = totalnum/2; root >= 1; root--) {    SCOPY(s, SD(root));    parent = root;    while ((child = parent * 2) <= totalnum) {      if (child < totalnum && SVAL(child) < SVAL(child+1)) {	child++;      }      if (STVAL >= SVAL(child)) {	break;      }      SCOPY(SD(parent), SD(child));      parent = child;    }    SCOPY(SD(parent), s);  }  n = totalnum;  while ( n > totalnum - neednum) {    SCOPY(s, SD(n));    SCOPY(SD(n), SD(1));    n--;    parent = 1;    while ((child = parent * 2) <= n) {      if (child < n && SVAL(child) < SVAL(child+1)) {	child++;      }      if (STVAL >= SVAL(child)) {	break;      }      SCOPY(SD(parent), SD(child));      parent = child;    }    SCOPY(SD(parent), s);  }}/**  * Calculate all GS state scores and select the best ones. *  */static voiddo_gms(){  int i;    /* compute all gshmm scores (in gs_score.c) */  compute_gs_scores(gsset, gsset_num, t_fs);  /* sort and select */  sort_gsindex_upward(my_nbest, gsset_num);  for(i=gsset_num - my_nbest;i<gsset_num;i++) {    /* set scores of selected states to LOG_ZERO */    t_fs[gsindex[i]] = LOG_ZERO;  }  /* power e -> 10 */#ifdef NORMALIZE_GS_SCORE  /* normalize other fallback scores (rate of max) */  for(i=0;i<gsset_num;i++) {    if (t_fs[i] != LOG_ZERO) {      t_fs[i] = t_fs[i] * 0.975;    }  }#endif}  /**  * Initialize the GMS related functions and data. *  * @param nbest [in] N-best state to compute the precise triphone. *  * @return TRUE on success, FALSE on failure. */booleangms_init(int nbest){  int i;    /* Check gshmm type */  if (OP_gshmm->is_triphone) {    j_printerr("Error: GS HMM should be a monophone model\n");    return FALSE;  }  if (OP_gshmm->is_tied_mixture) {    j_printerr("Error: GS HMM should not be a tied mixture model\n");    return FALSE;  }  /* store as local info */  my_nbest = nbest;  /* Register all GS HMM states in GS_SET */  build_gsset();  /* Make correspondence of all triphone states to GS HMM states */  j_printerr("Mapping HMM states to GS HMM...");  if (build_state2gs() == FALSE) {    j_printerr("Error: failed in assigning GS HMM state for each state\n");    return FALSE;  }  j_printerr("done\n");  /* prepare index buffer for heap sort */  gsindex = (int *)mymalloc(sizeof(int) * gsset_num);  for(i=0;i<gsset_num;i++) gsindex[i] = i;  /* init cache status */  fallback_score = NULL;  is_selected = NULL;  allocframenum = -1;  /* initialize gms_gprune functions */  gms_gprune_init(OP_hmminfo, gsset_num);    return TRUE;}/**  * Setup GMS parameters for next input. *  * @param framenum [in] length of next input in frames *  * @return TRUE on success, FALSE on failure. */booleangms_prepare(int framenum){  LOGPROB *tmp;  int t;  /* allocate cache */  if (allocframenum < framenum) {    if (fallback_score != NULL) {      free(fallback_score[0]);      free(fallback_score);      free(is_selected);    }    fallback_score = (LOGPROB **)mymalloc(sizeof(LOGPROB *) * framenum);    tmp = (LOGPROB *)mymalloc(sizeof(LOGPROB) * gsset_num * framenum);    for(t=0;t<framenum;t++) {      fallback_score[t] = &(tmp[gsset_num * t]);    }    is_selected = (boolean *)mymalloc(sizeof(boolean) * framenum);    allocframenum = framenum;  }  /* clear */  for(t=0;t<framenum;t++) is_selected[t] = FALSE;  /* prepare gms_gprune functions */  gms_gprune_prepare();    return TRUE;}/** * Free GMS related work areas. *  */voidgms_free(){  free_gsset();  free_state2gs();  free(gsindex);  if (fallback_score != NULL) {    free(fallback_score[0]);    free(fallback_score);    free(is_selected);  }  gms_gprune_free();}/**  * Get %HMM State probability of current state with Gaussiam Mixture Selection. * * If the GMS %HMM score of the corresponding basephone is below the * N-best, the triphone score will not be computed, and the score of * the GMS %HMM will be returned instead as a fallback score. * Else, the precise triphone will be computed and returned. *  * @return the state output probability score in log10. */LOGPROBgms_state(){  LOGPROB gsprob;  if (OP_last_time != OP_time) { /* different frame */    /* set current buffer */    t_fs = fallback_score[OP_time];    /* select state if not yet */    if (!is_selected[OP_time]) {      do_gms();      is_selected[OP_time] = TRUE;    }  }  if ((gsprob = t_fs[state2gs[OP_state_id]]) != LOG_ZERO) {    /* un-selected: return the fallback value */    return(gsprob);  }  /* selected: calculate the real outprob of the state */  return(calc_outprob());}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区视频在线观看 | www.99精品| 在线观看91视频| 久久精品免费在线观看| 亚洲国产视频a| 91亚洲国产成人精品一区二区三| 日韩视频永久免费| 午夜一区二区三区视频| 成人国产在线观看| 久久久蜜桃精品| 日本不卡一二三区黄网| 欧美在线观看一二区| 中文字幕制服丝袜成人av| 国产高清不卡二三区| 日韩限制级电影在线观看| 亚洲一区中文在线| 在线亚洲+欧美+日本专区| 中文字幕在线观看不卡| 国产 欧美在线| 国产亚洲欧美日韩日本| 韩国一区二区三区| 精品日韩在线观看| 狠狠色狠狠色合久久伊人| 欧美一区二区黄| 七七婷婷婷婷精品国产| 欧美一级免费大片| 日本不卡高清视频| 日韩美一区二区三区| 开心九九激情九九欧美日韩精美视频电影| 在线观看日韩一区| 亚洲成人午夜电影| 欧美性猛片xxxx免费看久爱| 亚洲欧美成人一区二区三区| 99在线热播精品免费| 亚洲欧美另类图片小说| 色综合久久综合网欧美综合网| 亚洲欧美日韩系列| 91亚洲精品一区二区乱码| 亚洲精品伦理在线| 欧美日韩亚洲综合一区| 日韩精品亚洲一区| 精品国产欧美一区二区| 国产精品一区二区三区四区 | 国产乱淫av一区二区三区 | 粉嫩av一区二区三区| 国产精品理论片| 一本久久精品一区二区| 三级欧美韩日大片在线看| 日韩视频一区二区在线观看| 国产精品一区二区在线观看网站| 中文字幕巨乱亚洲| 色噜噜狠狠色综合中国| 日日摸夜夜添夜夜添精品视频| 欧美一级二级在线观看| 国产乱码一区二区三区| 亚洲天堂免费看| 在线电影院国产精品| 久久66热偷产精品| 国产精品国产自产拍高清av王其| 欧美日韩一级大片网址| 国产精品99精品久久免费| 国产精品久久久久久久久果冻传媒 | 久久久噜噜噜久噜久久综合| 成人黄色在线看| 日韩电影免费在线看| 欧美激情一区在线观看| 在线播放中文一区| 成人av资源在线观看| 青青国产91久久久久久| 国产精品美女久久久久久久网站| 欧美日韩大陆在线| 成人免费视频网站在线观看| 五月天国产精品| 国产精品国产三级国产普通话蜜臀 | 精品免费视频.| 色婷婷久久99综合精品jk白丝| 精品一区二区三区免费播放| 国产精品乱子久久久久| 日韩精品中文字幕在线不卡尤物 | 欧美一区二区三区的| eeuss国产一区二区三区| 免费看日韩a级影片| 亚洲黄色尤物视频| 中日韩av电影| 久久免费美女视频| 日韩一级二级三级| 欧美主播一区二区三区美女| 国产成人精品免费网站| 蜜桃久久久久久| 午夜精品久久久久久久99樱桃 | 在线一区二区三区| 99久久久精品| 国产精品一区一区三区| 久久国产精品免费| 丝袜a∨在线一区二区三区不卡| 中文乱码免费一区二区| 2023国产精华国产精品| 91精品麻豆日日躁夜夜躁| 欧美中文字幕不卡| 在线看日本不卡| 99精品偷自拍| 99精品欧美一区| 91在线视频网址| 成年人国产精品| eeuss鲁片一区二区三区| 成人精品在线视频观看| 国产精品18久久久久久久久久久久| 蜜桃久久久久久久| 久久丁香综合五月国产三级网站| 日韩精品电影在线| 日本欧美一区二区| 日韩va欧美va亚洲va久久| 奇米在线7777在线精品 | 精品国产一区a| www成人在线观看| 久久久久久久电影| 中文字幕av免费专区久久| 国产精品免费网站在线观看| 亚洲欧洲韩国日本视频| 亚洲欧美激情一区二区| 亚洲综合区在线| 视频一区欧美精品| 日本不卡1234视频| 久99久精品视频免费观看| 国产精品一二三| 成人精品视频网站| 日本高清不卡一区| 欧美久久高跟鞋激| 久久婷婷久久一区二区三区| 久久午夜色播影院免费高清| 国产喷白浆一区二区三区| 中文字幕一区二区在线观看| 欧美激情艳妇裸体舞| 亚洲美女视频在线| 婷婷国产v国产偷v亚洲高清| 国内精品久久久久影院色| 波多野结衣中文字幕一区二区三区 | 日韩一区二区三区四区五区六区| 精品乱码亚洲一区二区不卡| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲人成电影网站色mp4| 日韩国产高清在线| 国产mv日韩mv欧美| 欧美亚洲动漫另类| 精品少妇一区二区三区免费观看| 国产精品国产三级国产aⅴ入口| 亚洲午夜精品久久久久久久久| 精品在线一区二区三区| av亚洲精华国产精华| 欧美二区在线观看| 国产精品成人一区二区三区夜夜夜| 亚洲在线观看免费| 国产成人在线观看| 777色狠狠一区二区三区| 国产精品入口麻豆九色| 亚洲午夜激情av| 粉嫩av一区二区三区在线播放| 欧美日韩国产123区| 日本一区二区三区高清不卡| 日日夜夜免费精品| 成人av电影免费观看| 精品免费国产二区三区| 一区二区三区欧美久久| 国产一区二区三区久久久| 欧美日韩一本到| 亚洲色大成网站www久久九九| 蜜臀av性久久久久av蜜臀妖精| av高清久久久| 精品国产乱子伦一区| 亚洲不卡一区二区三区| 成人精品国产一区二区4080| 日韩欧美三级在线| 亚洲一区在线电影| 99久免费精品视频在线观看| 日韩精品专区在线| 日韩二区在线观看| 91福利在线看| 最新日韩在线视频| 91福利在线免费观看| 国产偷国产偷精品高清尤物| 美女在线一区二区| 欧美日韩免费高清一区色橹橹 | 91一区二区三区在线观看| 国产日产欧美精品一区二区三区| 久久av资源网| 日韩精品一区二区在线观看| 午夜精品一区二区三区三上悠亚 | 99精品在线观看视频| 国产精品三级在线观看| 国产成人精品在线看| 337p日本欧洲亚洲大胆精品| 七七婷婷婷婷精品国产| 日韩三级中文字幕| 日本aⅴ亚洲精品中文乱码| 91精品国产综合久久蜜臀| 天堂久久一区二区三区| 在线播放91灌醉迷j高跟美女 | 亚洲美女偷拍久久| 一本色道久久综合亚洲91| 亚洲精品视频免费看|