From sumomo ¡÷ users.sourceforge.jp Sat Jul 9 19:49:19 2011 From: sumomo ¡÷ users.sourceforge.jp (sumomo ¡÷ users.sourceforge.jp) Date: Sat, 09 Jul 2011 19:49:19 +0900 Subject: [Julius-cvs 702] CVS update: julius4/libjulius/src Message-ID: <1310208559.610658.28171.nullmailer@users.sourceforge.jp> Index: julius4/libjulius/src/m_fusion.c diff -u julius4/libjulius/src/m_fusion.c:1.20 julius4/libjulius/src/m_fusion.c:1.21 --- julius4/libjulius/src/m_fusion.c:1.20 Fri Jun 24 14:07:56 2011 +++ julius4/libjulius/src/m_fusion.c Sat Jul 9 19:49:19 2011 @@ -20,7 +20,7 @@ * @author Akinobu Lee * @date Thu May 12 13:31:47 2005 * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * */ /* @@ -323,10 +323,14 @@ if (voca_load_line(buf, winfo, hmminfo) == FALSE) break; } if (voca_load_end(winfo) == FALSE) { - jlog("ERROR: m_fusion: failed to read dictionary %s\n", nl->name); - fclose(fp); - word_info_free(winfo); - return NULL; + if (lmconf->forcedict_flag) { + jlog("Warning: m_fusion: the error words above are ignored\n"); + } else { + jlog("ERROR: m_fusion: error in reading dictionary %s\n", nl->name); + fclose(fp); + word_info_free(winfo); + return NULL; + } } if (fclose(fp) == -1) { jlog("ERROR: m_fusion: failed to close %s\n", nl->name); From sumomo ¡÷ users.sourceforge.jp Mon Jul 11 15:46:27 2011 From: sumomo ¡÷ users.sourceforge.jp (sumomo ¡÷ users.sourceforge.jp) Date: Mon, 11 Jul 2011 15:46:27 +0900 Subject: [Julius-cvs 703] CVS update: julius4/libsent/src/voca Message-ID: <1310366787.092334.13483.nullmailer@users.sourceforge.jp> Index: julius4/libsent/src/voca/voca_load_htkdict.c diff -u julius4/libsent/src/voca/voca_load_htkdict.c:1.10 julius4/libsent/src/voca/voca_load_htkdict.c:1.11 --- julius4/libsent/src/voca/voca_load_htkdict.c:1.10 Fri Apr 29 14:09:20 2011 +++ julius4/libsent/src/voca/voca_load_htkdict.c Mon Jul 11 15:46:26 2011 @@ -19,7 +19,7 @@ * @author Akinobu LEE * @date Fri Feb 18 19:43:06 2005 * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * */ /* @@ -62,8 +62,8 @@ static char buf[MAXLINELEN]; ///< Local work area for input text processing static char bufbak[MAXLINELEN]; ///< Local work area for debug message -static char trbuf[3][20]; ///< Local buffer for triphone convertion -static char chbuf[30]; ///< Another local buffer for triphone convertion +static char trbuf[3][MAX_HMMNAME_LEN]; ///< Local buffer for triphone convertion +static char chbuf[MAX_HMMNAME_LEN]; ///< Another local buffer for triphone convertion static char nophone[1]; ///< Local buffer to indicate 'no phone' static int trp_l; ///< Triphone cycle index static int trp; ///< Triphone cycle index @@ -509,6 +509,12 @@ *ok_flag = FALSE; return TRUE; } + if (strlen(lp) >= MAX_HMMNAME_LEN) { + jlog("Error: voca_load_htkdict: line %d: too long phone name: %s\n", linenum, lp); + winfo->errnum++; + *ok_flag = FALSE; + return TRUE; + } cycle_triphone(lp); } @@ -517,7 +523,15 @@ if (do_conv) { /* if (lp != NULL) jlog(" %d%s",len,lp);*/ if (lp != NULL) lp = mystrtok(NULL, " \t\n"); - if (lp != NULL) p = cycle_triphone(lp); + if (lp != NULL) { + if (strlen(lp) >= MAX_HMMNAME_LEN) { + jlog("Error: voca_load_htkdict: line %d: too long phone name: %s\n", linenum, lp); + winfo->errnum++; + *ok_flag = FALSE; + return TRUE; + } + p = cycle_triphone(lp); + } else p = cycle_triphone_flush(); } else { p = mystrtok(NULL, " \t\n"); Index: julius4/libsent/src/voca/voca_load_wordlist.c diff -u julius4/libsent/src/voca/voca_load_wordlist.c:1.6 julius4/libsent/src/voca/voca_load_wordlist.c:1.7 --- julius4/libsent/src/voca/voca_load_wordlist.c:1.6 Fri Apr 29 14:09:20 2011 +++ julius4/libsent/src/voca/voca_load_wordlist.c Mon Jul 11 15:46:26 2011 @@ -13,7 +13,7 @@ * @author Akinobu LEE * @date Sun Jul 22 13:29:32 2007 * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * */ /* @@ -325,6 +325,12 @@ cycle_triphone(NULL); /* insert head phone at beginning of word */ if (contextphone) { + if (strlen(contextphone) >= MAX_HMMNAME_LEN) { + jlog("Error: voca_load_htkdict: line %d: too long phone name: %s\n", linenum, contextphone); + winfo->errnum++; + *ok_flag = FALSE; + return TRUE; + } cycle_triphone(contextphone); } else { cycle_triphone("NULL_C"); @@ -335,6 +341,12 @@ *ok_flag = FALSE; return TRUE; } + if (strlen(lp) >= MAX_HMMNAME_LEN) { + jlog("Error: voca_load_htkdict: line %d: too long phone name: %s\n", linenum, lp); + winfo->errnum++; + *ok_flag = FALSE; + return TRUE; + } p = cycle_triphone(lp); first = FALSE; } else { /* do_conv, not first */ @@ -342,10 +354,22 @@ lp = mystrtok(NULL, " \t\n"); if (lp != NULL) { /* token exist */ + if (strlen(lp) >= MAX_HMMNAME_LEN) { + jlog("Error: voca_load_htkdict: line %d: too long phone name: %s\n", linenum, lp); + winfo->errnum++; + *ok_flag = FALSE; + return TRUE; + } p = cycle_triphone(lp); } else { /* no more token, insert tail phone at end of word */ if (contextphone) { + if (strlen(contextphone) >= MAX_HMMNAME_LEN) { + jlog("Error: voca_load_htkdict: line %d: too long phone name: %s\n", linenum, contextphone); + winfo->errnum++; + *ok_flag = FALSE; + return TRUE; + } p = cycle_triphone(contextphone); } else { p = cycle_triphone("NULL_C"); From sumomo ¡÷ users.sourceforge.jp Thu Jul 28 16:07:48 2011 From: sumomo ¡÷ users.sourceforge.jp (sumomo ¡÷ users.sourceforge.jp) Date: Thu, 28 Jul 2011 16:07:48 +0900 Subject: [Julius-cvs 704] CVS update: julius4/libsent/src/wav2mfcc Message-ID: <1311836868.181850.22153.nullmailer@users.sourceforge.jp> Index: julius4/libsent/src/wav2mfcc/wav2mfcc-buffer.c diff -u julius4/libsent/src/wav2mfcc/wav2mfcc-buffer.c:1.5 julius4/libsent/src/wav2mfcc/wav2mfcc-buffer.c:1.6 --- julius4/libsent/src/wav2mfcc/wav2mfcc-buffer.c:1.5 Tue Oct 27 14:06:25 2009 +++ julius4/libsent/src/wav2mfcc/wav2mfcc-buffer.c Thu Jul 28 16:07:48 2011 @@ -24,7 +24,7 @@ * @author Akinobu LEE * @date Thu Feb 17 17:43:35 2005 * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * */ @@ -94,7 +94,7 @@ if (para->acc) Accel(mfcc, frame_num, para); /* Cepstrum Mean and/or Variance Normalization */ - if (para->cmn && ! para->cvn) CMN(mfcc, frame_num, para->mfcc_dim); + if (para->cmn && ! para->cvn) CMN(mfcc, frame_num, para->mfcc_dim + (para->c0 ? 1 : 0)); else if (para->cmn || para->cvn) MVN(mfcc, frame_num, para); return(frame_num); @@ -252,7 +252,7 @@ float x; int basedim; - basedim = para->mfcc_dim; // + (para->c0 ? 1 : 0); + basedim = para->mfcc_dim + (para->c0 ? 1 : 0); mfcc_mean = (float *)mycalloc(para->veclen, sizeof(float)); if (para->cvn) mfcc_sd = (float *)mycalloc(para->veclen, sizeof(float)); Index: julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c diff -u julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c:1.6 julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c:1.7 --- julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c:1.6 Fri Apr 29 14:09:20 2011 +++ julius4/libsent/src/wav2mfcc/wav2mfcc-pipe.c Thu Jul 28 16:07:48 2011 @@ -20,7 +20,7 @@ * @author Akinobu LEE * @date Thu Feb 17 18:12:30 2005 * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * */ /* @@ -253,7 +253,7 @@ c = (CMNWork *)mymalloc(sizeof(CMNWork)); c->cweight = weight; - c->mfcc_dim = para->mfcc_dim; // + (para->c0 ? 1 : 0); + c->mfcc_dim = para->mfcc_dim + (para->c0 ? 1 : 0); c->veclen = para->veclen; c->mean = para->cmn ? TRUE : FALSE; c->var = para->cvn ? TRUE : FALSE; From sumomo ¡÷ users.sourceforge.jp Thu Jul 28 16:11:35 2011 From: sumomo ¡÷ users.sourceforge.jp (sumomo ¡÷ users.sourceforge.jp) Date: Thu, 28 Jul 2011 16:11:35 +0900 Subject: [Julius-cvs 705] CVS update: julius4/julius Message-ID: <1311837095.984548.26888.nullmailer@users.sourceforge.jp> Index: julius4/julius/output_stdout.c diff -u julius4/julius/output_stdout.c:1.8 julius4/julius/output_stdout.c:1.9 --- julius4/julius/output_stdout.c:1.8 Fri Apr 29 14:09:14 2011 +++ julius4/julius/output_stdout.c Thu Jul 28 16:11:35 2011 @@ -12,7 +12,7 @@ * @author Akinobu Lee * @date Tue Sep 06 17:18:46 2005 * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * */ /* @@ -555,8 +555,8 @@ /* debug: output all graph word info */ wordgraph_dump(stdout, r->result.wg1, winfo); for(wg=r->result.wg1;wg;wg=wg->next) { - tw1 = (TEXTWIDTH * wg->lefttime) / recog->peseqlen; - tw2 = (TEXTWIDTH * wg->righttime) / recog->peseqlen; + tw1 = (TEXTWIDTH * wg->lefttime) / r->peseqlen; + tw2 = (TEXTWIDTH * wg->righttime) / r->peseqlen; printf("%4d:", wg->id); for(i=0;iwoutput[wg->wid]); From sumomo ¡÷ users.sourceforge.jp Thu Jul 28 16:11:36 2011 From: sumomo ¡÷ users.sourceforge.jp (sumomo ¡÷ users.sourceforge.jp) Date: Thu, 28 Jul 2011 16:11:36 +0900 Subject: [Julius-cvs 706] CVS update: julius4/libjulius/src Message-ID: <1311837096.066471.26900.nullmailer@users.sourceforge.jp> Index: julius4/libjulius/src/beam.c diff -u julius4/libjulius/src/beam.c:1.17 julius4/libjulius/src/beam.c:1.18 --- julius4/libjulius/src/beam.c:1.17 Fri Apr 29 14:09:15 2011 +++ julius4/libjulius/src/beam.c Thu Jul 28 16:11:35 2011 @@ -42,7 +42,7 @@ * @author Akinobu LEE * @date Tue Feb 22 17:00:45 2005 * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * */ /* @@ -219,6 +219,7 @@ static void re_compute_lattice_lm(WordGraph *root, WCHMM_INFO *wchmm) { + WordGraph *wg; int i; for(wg=root;wg;wg=wg->next) {