libjulius/src/m_info.c

Go to the documentation of this file.
00001 
00018 /*
00019  * Copyright (c) 1991-2007 Kawahara Lab., Kyoto University
00020  * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology
00021  * Copyright (c) 2005-2007 Julius project team, Nagoya Institute of Technology
00022  * All rights reserved
00023  */
00024 
00025 #include <julius/julius.h>
00026 
00041 void
00042 print_jconf_overview(Jconf *jconf)
00043 {
00044   JCONF_AM *amconf;
00045   JCONF_LM *lmconf;
00046   JCONF_SEARCH *sconf;
00047   GRAMLIST *g;
00048   int i, n;
00049 
00050   jlog("------------------------------------------------------------\n");
00051   jlog("Configuration of Modules\n\n");
00052   jlog(" Number of defined modules:");
00053   i = 0; for(amconf=jconf->am_root;amconf;amconf=amconf->next) i++;
00054   jlog(" AM=%d,", i);
00055   i = 0; for(lmconf=jconf->lm_root;lmconf;lmconf=lmconf->next) i++;
00056   jlog(" LM=%d,", i);
00057   i = 0; for(sconf=jconf->search_root;sconf;sconf=sconf->next) i++;
00058   jlog(" SR=%d\n", i);
00059   
00060   jlog("\n");
00061   
00062   jlog(" Acoustic Model (with input parameter spec.):\n");
00063   for(amconf=jconf->am_root;amconf;amconf=amconf->next) {
00064     if (amconf->name[0] != '\0') {
00065       jlog(" - AM%02d \"%s\"\n", amconf->id, amconf->name);
00066     } else {
00067       jlog(" - AM%02d\n", amconf->id);
00068     }
00069     jlog("\thmmfilename=%s\n",amconf->hmmfilename);
00070     if (amconf->mapfilename != NULL) {
00071       jlog("\thmmmapfilename=%s\n",amconf->mapfilename);
00072     }
00073     if (amconf->hmm_gs_filename != NULL) {
00074       jlog("\thmmfile for Gaussian Selection: %s\n", amconf->hmm_gs_filename);
00075     }
00076   }
00077   jlog("\n");
00078   
00079   jlog(" Language Model:\n");
00080   for(lmconf=jconf->lm_root;lmconf;lmconf=lmconf->next) {
00081     if (lmconf->name[0] != '\0') {
00082       jlog(" - LM%02d \"%s\"\n", lmconf->id, lmconf->name);
00083     } else {
00084       jlog(" - LM%02d\n", lmconf->id);
00085     }
00086     if (lmconf->lmtype == LM_PROB) {
00087       jlog("\tvocabulary filename=%s\n",lmconf->dictfilename);
00088       if (lmconf->ngram_filename != NULL) {
00089         jlog("\tn-gram  filename=%s (binary format)\n", lmconf->ngram_filename);
00090       } else {
00091         if (lmconf->ngram_filename_rl_arpa != NULL) {
00092           jlog("\tbackward n-gram filename=%s\n", lmconf->ngram_filename_rl_arpa);
00093           if (lmconf->ngram_filename_lr_arpa != NULL) {
00094             jlog("\tforward 2-gram for pass1=%s\n", lmconf->ngram_filename_lr_arpa);
00095           }
00096         } else if (lmconf->ngram_filename_lr_arpa != NULL) {
00097           jlog("\tforward n-gram filename=%s\n", lmconf->ngram_filename_lr_arpa);
00098         }
00099       }
00100     }
00101     if (lmconf->lmtype == LM_DFA) {
00102       switch(lmconf->lmvar) {
00103       case LM_DFA_GRAMMAR:
00104         n = 1;
00105         for(g = lmconf->gramlist_root; g; g = g->next) {
00106           jlog("\tgrammar #%d:\n", n++);
00107           jlog("\t    dfa  = %s\n", g->dfafile);
00108           jlog("\t    dict = %s\n", g->dictfile);
00109         }
00110         break;
00111       case LM_DFA_WORD:
00112         n = 1;
00113         for(g = lmconf->wordlist_root; g; g = g->next) {
00114           jlog("\twordlist #%d: %s\n", n++, g->dictfile);
00115         }
00116         break;
00117       }
00118     }
00119   }
00120   jlog("\n");
00121   jlog(" Recognizer:\n");
00122   for(sconf=jconf->search_root; sconf; sconf=sconf->next) {
00123     if (sconf->name[0] != '\0') {
00124       jlog(" - SR%02d \"%s\"", sconf->id, sconf->name);
00125     } else {
00126       jlog(" - SR%02d", sconf->id);
00127     }
00128     jlog(" (AM%02d, LM%02d)\n", sconf->amconf->id, sconf->lmconf->id);
00129   }
00130   jlog("\n");
00131 }
00132 
00133 
00134 
00148 void
00149 print_engine_info(Recog *recog)
00150 {
00151   FILE *fp;
00152   Jconf *jconf;
00153   MFCCCalc *mfcc;
00154   PROCESS_AM *am;
00155   PROCESS_LM *lm;
00156   RecogProcess *r;
00157 
00158   jconf = recog->jconf;
00159   
00160   /* set output file pointer to fp */
00161   fp = jlog_get_fp();
00162   if (fp == NULL) return;
00163 
00164   jlog("----------------------- System Information begin ---------------------\n");
00165   j_put_header(fp);
00166   j_put_compile_defs(fp);
00167   jlog("\n");
00168   
00169   /* print current argument setting to log */
00170   print_jconf_overview(jconf);
00171 
00172   /* for backward compatibility with scoring tool (IPA99)... :-( */
00173 #if 0
00174   if (jconf->input.speech_input == SP_RAWFILE) {
00175     jlog("Speech input source: file\n\n");
00176   } else if (jconf->input.speech_input == SP_MFCFILE) {
00177     jlog("Speech input source: MFCC parameter file (HTK format)\n\n");
00178   }
00179 #endif
00180 
00181   if (jconf->input.speech_input != SP_MFCFILE) {
00182 
00183     /* acoustic parameter conditions for this model */
00184     jlog("------------------------------------------------------------\n");
00185     jlog("Speech Analysis Module(s)\n\n");
00186     
00187     for(mfcc=recog->mfcclist;mfcc;mfcc=mfcc->next) {
00188 
00189       jlog("[MFCC%02d]  for", mfcc->id);
00190       for(am=recog->amlist;am;am=am->next) {
00191         if (am->mfcc == mfcc) {
00192           jlog(" [AM%02d %s]", am->config->id, am->config->name);
00193         }
00194       }
00195       if (recog->gmm != NULL) {
00196         if (recog->gmmmfcc == mfcc) {
00197           jlog(" [GMM]");
00198         }
00199       }
00200       jlog("\n\n");
00201 
00202       put_para(fp, mfcc->para);
00203 
00204       if (jconf->input.speech_input != SP_MFCFILE) {
00205         jlog("    spectral subtraction = ");
00206         if (mfcc->frontend.ssload_filename || mfcc->frontend.sscalc) {
00207           if (mfcc->frontend.sscalc) {
00208             jlog("use head silence of each input\n");
00209             jlog("\t     head sil length = %d msec\n", mfcc->frontend.sscalc_len);
00210           } else {                      /* ssload_filename != NULL */
00211             jlog("use a constant value from file\n");
00212             jlog("         noise spectrum file = \"%s\"\n", mfcc->frontend.ssload_filename);
00213           }
00214           jlog("\t         alpha coef. = %f\n", mfcc->frontend.ss_alpha);
00215           jlog("\t      spectral floor = %f\n", mfcc->frontend.ss_floor);
00216         } else {
00217           jlog("off\n");
00218         }
00219       }
00220       jlog("     cepstral mean norm. = ");
00221       if (mfcc->para->cmn) {
00222         if (jconf->decodeopt.realtime_flag) {
00223           jlog("real-time MAP-CMN\n");
00224         } else {
00225           jlog("sentence CMN\n");
00226         }
00227       } else {
00228         jlog("no\n");
00229       }
00230       jlog("\t base setup from =");
00231       if (mfcc->htk_loaded == 1 || mfcc->hmm_loaded == 1) {
00232         if (mfcc->hmm_loaded == 1) {
00233           jlog(" binhmm-embedded");
00234           if (mfcc->htk_loaded == 1) {
00235             jlog(", then overridden by HTK Config and defaults");
00236           }
00237         } else {
00238           if (mfcc->htk_loaded == 1) {
00239             jlog(" HTK Config (and HTK defaults)");
00240           }
00241         }
00242       } else {
00243         jlog(" Julius defaults");
00244       }
00245       jlog("\n");
00246 
00247       jlog("\n");
00248 
00249       if (jconf->decodeopt.realtime_flag && mfcc->para->cmn) {
00250         jlog(" MAP-CMN:\n");
00251         jlog("      default cep. mean   = ");
00252         if (mfcc->cmn.load_filename) {
00253           jlog("load from \"%s\"\n", mfcc->cmn.load_filename);
00254         } else {
00255           jlog("not specified\n");
00256         }
00257         jlog("      initial mean weight = %6.2f\n", mfcc->cmn.map_weight);
00258         if (mfcc->cmn.update) {
00259           jlog("      initial mean update = yes, from last inputs at each input\n");
00260         } else {
00261           jlog("      initial mean update = no, use default as initial at each input\n");
00262         }
00263         if (mfcc->cmn.save_filename) {
00264           jlog("      save cep. mean to   = %s at end of each input\n", mfcc->cmn.save_filename);
00265         }
00266         jlog("\n");
00267       }
00268 
00269     }
00270   }
00271 
00272 
00273   if (recog->gmm != NULL) {
00274     jlog("------------------------------------------------------------\n");
00275     jlog("GMM\n");
00276     jlog("\n");
00277     jlog("     GMM definition file = %s\n", jconf->reject.gmm_filename);
00278     jlog("          GMM gprune num = %d\n", jconf->reject.gmm_gprune_num);
00279     if (jconf->reject.gmm_reject_cmn_string != NULL) {
00280       jlog("     GMM names to reject = %s\n", jconf->reject.gmm_reject_cmn_string);
00281     }
00282 #ifdef GMM_VAD
00283     jlog("\n GMM-based VAD\n\n");
00284     jlog("       backstep on trigger = %d frames\n", jconf->detect.gmm_margin);
00285 #endif
00286     jlog("\n GMM");
00287     print_hmmdef_info(fp, recog->gmm);
00288     jlog("\n");
00289   }
00290 
00291   jlog("------------------------------------------------------------\n");
00292   jlog("Acoustic Model(s)\n");
00293   jlog("\n");
00294 
00295   for(am = recog->amlist; am; am = am->next) {
00296     if (am->config->name[0] != '\0') {
00297       jlog("[AM%02d \"%s\"]\n\n", am->config->id, am->config->name);
00298     } else {
00299       jlog("[AM%02d]\n\n", am->config->id);
00300     }
00301     print_hmmdef_info(fp, am->hmminfo);
00302     jlog("\n");
00303     if (am->config->hmm_gs_filename != NULL) {
00304       jlog("GS ");
00305       print_hmmdef_info(fp, am->hmm_gs);
00306       jlog("\n");
00307     }
00308 
00309     jlog(" AM Parameters:\n");
00310 
00311     jlog("        Gaussian pruning = ");
00312     switch(am->config->gprune_method){
00313     case GPRUNE_SEL_NONE: jlog("none (full computation)"); break;
00314     case GPRUNE_SEL_BEAM: jlog("beam"); break;
00315     case GPRUNE_SEL_HEURISTIC: jlog("heuristic"); break;
00316     case GPRUNE_SEL_SAFE: jlog("safe"); break;
00317     }
00318     jlog("  (-gprune)\n");
00319     if (am->config->gprune_method != GPRUNE_SEL_NONE) {
00320       jlog("  top N mixtures to calc = %d / %d  (-tmix)\n", am->config->mixnum_thres, am->hmminfo->maxcodebooksize);
00321     }
00322     if (am->config->hmm_gs_filename != NULL) {
00323       jlog("      GS state num thres = %d / %d selected  (-gsnum)\n", am->config->gs_statenum, am->hmm_gs->totalstatenum);
00324     }
00325     jlog("    short pause HMM name = \"%s\" specified", am->config->spmodel_name);
00326     if (am->hmminfo->sp != NULL) {
00327       jlog(", \"%s\" applied", am->hmminfo->sp->name);
00328       if (am->hmminfo->sp->is_pseudo) {
00329         jlog(" (pseudo)");
00330       } else {
00331         jlog(" (physical)");
00332       }
00333     }
00334     jlog("  (-sp)\n");
00335     jlog("  cross-word CD on pass1 = ");
00336 #ifdef PASS1_IWCD
00337     jlog("handle by approx. ");
00338     switch(am->hmminfo->cdset_method) {
00339     case IWCD_AVG:
00340       jlog("(use average prob. of same LC)\n");
00341       break;
00342     case IWCD_MAX:
00343       jlog("(use max. prob. of same LC)\n");
00344       break;
00345     case IWCD_NBEST:
00346       jlog("(use %d-best of same LC)\n", am->hmminfo->cdmax_num);
00347       break;
00348     }
00349 #else
00350     jlog("disabled\n");
00351 #endif
00352     
00353     if (am->hmminfo->multipath) {
00354       jlog("   sp transition penalty = %+2.1f\n", am->config->iwsp_penalty);
00355     }
00356 
00357     jlog("\n");
00358   }
00359 
00360   jlog("------------------------------------------------------------\n");
00361   jlog("Language Model(s)\n");
00362 
00363   for(lm = recog->lmlist; lm; lm = lm->next) {
00364     jlog("\n");
00365     if (lm->config->name[0] != '\0') {
00366       jlog("[LM%02d \"%s\"]", lm->config->id, lm->config->name);
00367     } else {
00368       jlog("[LM%02d]", lm->config->id);
00369     }
00370     if (lm->lmtype == LM_PROB) {
00371       if (lm->lmvar == LM_NGRAM) {
00372         jlog(" type=n-gram\n\n");
00373         if (lm->ngram) {
00374           print_ngram_info(fp, lm->ngram); jlog("\n");
00375         }
00376       } else if (lm->lmvar == LM_NGRAM_USER) {
00377         if (lm->ngram) {
00378           jlog(" type=n-gram + user\n\n");
00379           print_ngram_info(fp, lm->ngram); jlog("\n");
00380         } else {
00381           jlog(" type=user\n\n");
00382         }
00383       } else {
00384         jlog(" type=UNKNOWN??\n\n");
00385       }
00386     } else if (lm->lmtype == LM_DFA) {
00387       if (lm->lmvar == LM_DFA_GRAMMAR) {
00388         jlog(" type=grammar\n\n");
00389         if (lm->dfa) {
00390           print_dfa_info(fp, lm->dfa); jlog("\n");
00391           if (debug2_flag) {
00392             print_dfa_cp(fp, lm->dfa);
00393             jlog("\n");
00394           }
00395         }
00396       } else if (lm->lmvar == LM_DFA_WORD) {
00397         jlog(" type=word\n\n");
00398       } else {
00399         jlog(" type=UNKNOWN??\n\n");
00400       }
00401     } else {
00402       jlog(" type=UNKNOWN??\n\n");
00403     }
00404     if (lm->winfo != NULL) {
00405       print_voca_info(fp, lm->winfo); jlog("\n");
00406     }
00407 
00408     jlog(" Parameters:\n");
00409 
00410     if (lm->lmtype == LM_DFA && lm->lmvar == LM_DFA_GRAMMAR) {
00411       if (lm->dfa != NULL) {
00412         int i;
00413         jlog("   found sp category IDs =");
00414         for(i=0;i<lm->dfa->term_num;i++) {
00415           if (lm->dfa->is_sp[i]) {
00416             jlog(" %d", i);
00417           }
00418         }
00419         jlog("\n");
00420       }
00421     }
00422     
00423     if (lm->lmtype == LM_PROB) {
00424       if (lm->config->enable_iwspword) {
00425         jlog("\tIW-sp word added to dict= \"%s\"\n", lm->config->iwspentry);
00426       }
00427     }
00428 
00429     if (lm->lmtype == LM_PROB) {    
00430       jlog("\t(-silhead)head sil word = ");
00431       put_voca(fp, lm->winfo, lm->winfo->head_silwid);
00432       jlog("\t(-siltail)tail sil word = ");
00433       put_voca(fp, lm->winfo, lm->winfo->tail_silwid);
00434     }
00435 
00436     if (lm->lmvar == LM_DFA_WORD) {
00437       jlog("     silence model names to add at word head / tail:  (-wsil)\n");
00438       jlog("\tword head          = \"%s\"\n", lm->config->wordrecog_head_silence_model_name);
00439       jlog("\tword tail          = \"%s\"\n", lm->config->wordrecog_tail_silence_model_name);
00440       jlog("\ttheir context name = \"%s\"\n", (lm->config->wordrecog_silence_context_name[0] == '\0') ? "NULL (blank)" : lm->config->wordrecog_silence_context_name);
00441       
00442     }
00443 
00444   }
00445 
00446   jlog("\n");
00447   jlog("------------------------------------------------------------\n");
00448   jlog("Recognizer(s)\n\n");
00449 
00450   for(r = recog->process_list; r; r = r->next) {
00451     jlog("[SR%02d", r->config->id);
00452     if (r->config->name[0] != '\0') {
00453       jlog(" \"%s\"", r->config->name);
00454     }
00455     jlog("]  ");
00456     if (r->am->config->name[0] != '\0') {
00457       jlog("AM%02d \"%s\"", r->am->config->id, r->am->config->name);
00458     } else {
00459       jlog("AM%02d", r->am->config->id);
00460     }
00461     jlog("  +  ");
00462     if (r->lm->config->name[0] != '\0') {
00463       jlog("LM%02d \"%s\"", r->lm->config->id, r->lm->config->name);
00464     } else {
00465       jlog("LM%02d", r->lm->config->id);
00466     }
00467     jlog("\n\n");
00468 
00469     if (r->wchmm != NULL) {
00470       print_wchmm_info(r->wchmm); jlog("\n");
00471     }
00472     if (r->lmtype == LM_PROB) {
00473       jlog(" Inter-word N-gram cache: \n");
00474       {
00475         int num, len;
00476 #ifdef UNIGRAM_FACTORING
00477         len = r->wchmm->isolatenum;
00478         jlog("\troot node to be cached = %d / %d (isolated only)\n",
00479              len, r->wchmm->startnum);
00480 #else
00481         len = r->wchmm->startnum;
00482         jlog("\troot node to be cached = %d (all)\n", len);
00483 #endif
00484 #ifdef HASH_CACHE_IW
00485         num = (r->config->pass1.iw_cache_rate * r->lm->ngram->max_word_num) / 100;
00486         jlog("\tword ends to be cached = %d / %d\n", num, r->lm->ngram->max_word_num);
00487 #else
00488         num = r->lm->ngram->max_word_num;
00489         jlog("\tword ends to be cached = %d (all)\n", num);
00490 #endif
00491         jlog("\t  max. allocation size = %dMB\n", num * len / 1000 * sizeof(LOGPROB) / 1000);
00492       }
00493     }
00494 
00495     if (r->lmtype == LM_PROB) {
00496       jlog("\t(-lmp)  pass1 LM weight = %2.1f  ins. penalty = %+2.1f\n", r->config->lmp.lm_weight, r->config->lmp.lm_penalty);
00497       jlog("\t(-lmp2) pass2 LM weight = %2.1f  ins. penalty = %+2.1f\n", r->config->lmp.lm_weight2, r->config->lmp.lm_penalty2);
00498       jlog("\t(-transp)trans. penalty = %+2.1f per word\n", r->config->lmp.lm_penalty_trans);
00499     } else if (r->lmtype == LM_DFA && r->lmvar == LM_DFA_GRAMMAR) {
00500       jlog("\t(-penalty1) IW penalty1 = %+2.1f\n", r->config->lmp.penalty1);
00501       jlog("\t(-penalty2) IW penalty2 = %+2.1f\n", r->config->lmp.penalty2);
00502     }
00503 
00504 
00505 #ifdef CONFIDENCE_MEASURE
00506 #ifdef CM_MULTIPLE_ALPHA
00507     jlog("\t(-cmalpha)CM alpha coef = from %f to %f by step of %f (%d outputs)\n", r->config->annotate.cm_alpha_bgn, r->config->annotate.cm_alpha_end, r->config->annotate.cm_alpha_step, r->config->annotate.cm_alpha_num);
00508 #else
00509     jlog("\t(-cmalpha)CM alpha coef = %f\n", r->config->annotate.cm_alpha);
00510 #endif
00511 #ifdef CM_SEARCH_LIMIT
00512     jlog("\t(-cmthres) CM cut thres = %f for hypo generation\n", r->config->annotate.cm_cut_thres);
00513 #endif
00514 #ifdef CM_SEARCH_LIMIT_POP
00515     jlog("\t(-cmthres2)CM cut thres = %f for popped hypo\n", r->config->annotate.cm_cut_thres_pop);
00516 #endif
00517 #endif /* CONFIDENCE_MEASURE */
00518     jlog("\n");
00519 
00520     if (r->am->hmminfo->multipath) {
00521       if (r->lm->config->enable_iwsp) {
00522         jlog("\t inter-word short pause = on (append \"%s\" for each word tail)\n", r->am->hmminfo->sp->name);
00523         jlog("\t  sp transition penalty = %+2.1f\n", r->am->config->iwsp_penalty);
00524       }
00525     }
00526 
00527     if (r->lmvar == LM_DFA_WORD) {
00528 #ifdef DETERMINE
00529       jlog("    early word determination:  (-wed)\n");
00530       jlog("\tscore threshold    = %f\n", r->config->pass1.determine_score_thres);
00531       jlog("\tframe dur. thres   = %d\n", r->config->pass1.determine_duration_thres);
00532 #endif
00533     }
00534 
00535     jlog(" Search parameters: \n");
00536     jlog("\t    multi-path handling = ");
00537     if (r->am->hmminfo->multipath) {
00538       jlog("yes, multi-path mode enabled\n");
00539     } else {
00540       jlog("no\n");
00541     }
00542     jlog("\t(-b) trellis beam width = %d", r->trellis_beam_width);
00543     if (r->config->pass1.specified_trellis_beam_width == -1) {
00544       jlog(" (-1 or not specified - guessed)\n");
00545     } else if (r->config->pass1.specified_trellis_beam_width == 0) {
00546       jlog(" (0 - full)\n");
00547     } else {
00548       jlog("\n");
00549     }
00550     jlog("\t(-n)search candidate num= %d\n", r->config->pass2.nbest);
00551     jlog("\t(-s)  search stack size = %d\n", r->config->pass2.stack_size);
00552     jlog("\t(-m)    search overflow = after %d hypothesis poped\n", r->config->pass2.hypo_overflow);
00553     jlog("\t        2nd pass method = ");
00554     if (r->config->graph.enabled) {
00555 #ifdef GRAPHOUT_DYNAMIC
00556 #ifdef GRAPHOUT_SEARCH
00557       jlog("searching graph, generating dynamic graph\n");
00558 #else
00559       jlog("searching sentence, generating dynamic graph\n");
00560 #endif /* GRAPHOUT_SEARCH */
00561 #else  /* ~GRAPHOUT_DYNAMIC */
00562       jlog("searching sentence, generating static graph from N-best\n");
00563 #endif
00564     } else {
00565       jlog("searching sentence, generating N-best\n");
00566     }
00567     if (r->config->pass2.enveloped_bestfirst_width >= 0) {
00568       jlog("\t(-b2)  pass2 beam width = %d\n", r->config->pass2.enveloped_bestfirst_width);
00569     }
00570     jlog("\t(-lookuprange)lookup range= %d  (tm-%d <= t <tm+%d)\n",r->config->pass2.lookup_range,r->config->pass2.lookup_range,r->config->pass2.lookup_range);
00571 #ifdef SCAN_BEAM
00572     jlog("\t(-sb)2nd scan beamthres = %.1f (in logscore)\n", r->config->pass2.scan_beam_thres);
00573 #endif
00574     jlog("\t(-n)        search till = %d candidates found\n", r->config->pass2.nbest);
00575     jlog("\t(-output)    and output = %d candidates out of above\n", r->config->output.output_hypo_maxnum);
00576 
00577     if (r->ccd_flag) {
00578       jlog("\t IWCD handling:\n");
00579 #ifdef PASS1_IWCD
00580       jlog("\t   1st pass: approximation ");
00581       switch(r->am->hmminfo->cdset_method) {
00582       case IWCD_AVG:
00583         jlog("(use average prob. of same LC)\n");
00584         break;
00585       case IWCD_MAX:
00586         jlog("(use max. prob. of same LC)\n");
00587         break;
00588       case IWCD_NBEST:
00589         jlog("(use %d-best of same LC)\n", r->am->hmminfo->cdmax_num);
00590         break;
00591       }
00592 #else
00593       jlog("\t   1st pass: ignored\n");
00594 #endif
00595 #ifdef PASS2_STRICT_IWCD
00596       jlog("\t   2nd pass: strict (apply when expanding hypo. )\n");
00597 #else
00598       jlog("\t   2nd pass: loose (apply when hypo. is popped and scanned)\n");
00599 #endif
00600     }
00601     if (r->lmtype == LM_PROB) {
00602       jlog("\t factoring score: ");
00603 #ifdef UNIGRAM_FACTORING
00604       jlog("1-gram prob. (statically assigned beforehand)\n");
00605 #else
00606       jlog("2-gram prob. (dynamically computed while search)\n");
00607 #endif
00608     }
00609 
00610     if (r->config->annotate.align_result_word_flag) {
00611       jlog("\t output word alignments\n");
00612     }
00613     if (r->config->annotate.align_result_phoneme_flag) {
00614       jlog("\t output phoneme alignments\n");
00615     }
00616     if (r->config->annotate.align_result_state_flag) {
00617       jlog("\t output state alignments\n");
00618     }
00619     if (r->lmtype == LM_DFA && r->lmvar == LM_DFA_GRAMMAR) {
00620       if (r->config->pass2.looktrellis_flag) {
00621         jlog("\t only words in backtrellis will be expanded in 2nd pass\n");
00622       } else {
00623         jlog("\t all possible words will be expanded in 2nd pass\n");
00624       }
00625     }
00626     if (r->wchmm->category_tree) {
00627       if (r->config->pass1.old_tree_function_flag) {
00628         jlog("\t build_wchmm() used\n");
00629       } else {
00630         jlog("\t build_wchmm2() used\n");
00631       }
00632 #ifdef PASS1_IWCD
00633 #ifdef USE_OLD_IWCD
00634       jlog("\t full lcdset used\n");
00635 #else
00636       jlog("\t lcdset limited by word-pair constraint\n");
00637 #endif
00638 #endif /* PASS1_IWCD */
00639     }
00640     if (r->config->output.progout_flag) {
00641       jlog("\tprogressive output on 1st pass\n");
00642     }
00643     if (r->config->compute_only_1pass) {
00644       jlog("\tCompute only 1-pass\n");
00645     }
00646     
00647     if (r->config->graph.enabled) {
00648       jlog("\n");
00649       jlog("Graph-based output with graph-oriented search:\n");
00650       jlog("\t(-lattice)      word lattice = %s\n", r->config->graph.lattice ? "yes" : "no");
00651       jlog("\t(-confnet) confusion network = %s\n", r->config->graph.confnet ? "yes" : "no");
00652       if (r->config->graph.lattice == TRUE) {
00653         jlog("\t(-graphrange)         margin = %d frames", r->config->graph.graph_merge_neighbor_range);
00654         if (r->config->graph.graph_merge_neighbor_range < 0) {
00655           jlog(" (all post-marging disabled)\n");
00656         } else if (r->config->graph.graph_merge_neighbor_range == 0) {
00657           jlog(" (merge same word with the same boundary)\n");
00658         } else {
00659           jlog(" (merge same words around this margin)\n");
00660         }
00661       }
00662 #ifdef GRAPHOUT_DEPTHCUT
00663       jlog("\t(-graphcut)cutoff depth      = ");
00664       if (r->config->graph.graphout_cut_depth < 0) {
00665         jlog("disabled (-1)\n");
00666       } else {
00667         jlog("%d words\n",r->config->graph.graphout_cut_depth);
00668       }
00669 #endif
00670 #ifdef GRAPHOUT_LIMIT_BOUNDARY_LOOP
00671       jlog("\t(-graphboundloop)loopmax     = %d for boundary adjustment\n",r->config->graph.graphout_limit_boundary_loop_num);
00672 #endif
00673 #ifdef GRAPHOUT_SEARCH_DELAY_TERMINATION
00674       jlog("\tInhibit graph search termination before 1st sentence found = ");
00675       if (r->config->graph.graphout_search_delay) {
00676         jlog("enabled\n");
00677       } else {
00678         jlog("disabled\n");
00679       }
00680 #endif
00681 
00682     }
00683     
00684     if (r->config->successive.enabled) {
00685       jlog("\tshort pause segmentation = on\n");
00686       jlog("\t      sp duration length = %d frames\n", r->config->successive.sp_frame_duration);
00687 #ifdef SPSEGMENT_NAIST
00688       jlog("      backstep margin on trigger = %d frames\n", r->config->successive.sp_margin);
00689       jlog("\t        delay on trigger = %d frames\n", r->config->successive.sp_delay);
00690 #endif
00691       if (r->config->successive.pausemodelname) {
00692         jlog("\t   pause models for seg. = %s\n",  r->config->successive.pausemodelname);
00693       }
00694     } else {
00695       jlog("\tshort pause segmentation = off\n");
00696     }
00697     if (r->config->output.progout_flag) {
00698       jlog("\t        progout interval = %d msec\n", r->config->output.progout_interval);
00699     }
00700 
00701     jlog("\n");
00702   }
00703 
00704   jlog("------------------------------------------------------------\n");
00705   jlog("Decoding algorithm:\n\n");
00706   jlog("\t1st pass input processing = ");
00707   if (jconf->decodeopt.force_realtime_flag) jlog("(forced) ");
00708   if (jconf->decodeopt.realtime_flag) {
00709     jlog("real time, on-the-fly\n");
00710   } else {
00711     jlog("buffered, batch\n");
00712   }
00713   jlog("\t1st pass method = ");
00714 #ifdef WPAIR
00715 # ifdef WPAIR_KEEP_NLIMIT
00716   jlog("word-pair approx., keeping only N tokens ");
00717 # else
00718   jlog("word-pair approx. ");
00719 # endif
00720 #else
00721   jlog("1-best approx. ");
00722 #endif
00723 #ifdef WORD_GRAPH
00724   jlog("generating word_graph\n");
00725 #else
00726   jlog("generating indexed trellis\n");
00727 #endif
00728 #ifdef CONFIDENCE_MEASURE
00729   jlog("\toutput word confidence measure ");
00730 #ifdef CM_NBEST
00731   jlog("based on N-best candidates\n");
00732 #endif
00733 #ifdef CM_SEARCH
00734   jlog("based on search-time scores\n");
00735 #endif
00736 #endif /* CONFIDENCE_MEASURE */
00737   
00738   jlog("\n");
00739 
00740   jlog("------------------------------------------------------------\n");
00741   jlog("FrontEnd:\n\n");
00742 
00743   jlog(" Speech input:\n");
00744   jlog("\t    speech input source = ");
00745   if (jconf->input.speech_input == SP_RAWFILE) {
00746     jlog("speech file\n");
00747     jlog("\t          input filelist = ");
00748     if (jconf->input.inputlist_filename == NULL) {
00749       jlog("(none, enter filenames from stdin)\n");
00750     } else {
00751       jlog("%s\n", jconf->input.inputlist_filename);
00752     }
00753   } else if (jconf->input.speech_input == SP_MFCFILE) {
00754     jlog("MFCC parameter file (HTK format)\n");
00755     jlog("\t                filelist = ");
00756     if (jconf->input.inputlist_filename == NULL) {
00757       jlog("(none, enter filenames from stdin)\n");
00758     } else {
00759       jlog("%s\n", jconf->input.inputlist_filename);
00760     }
00761   } else if (jconf->input.speech_input == SP_STDIN) {
00762     jlog("standard input\n");
00763   } else if (jconf->input.speech_input == SP_ADINNET) {
00764     jlog("adinnet client\n");
00765 #ifdef USE_NETAUDIO
00766   } else if (jconf->input.speech_input == SP_NETAUDIO) {
00767     char *p;
00768     jlog("NetAudio server on ");
00769     if (jconf->input.netaudio_devname != NULL) {
00770       jlog("%s\n", jconf->input.netaudio_devname);
00771     } else if ((p = getenv("AUDIO_DEVICE")) != NULL) {
00772       jlog("%s\n", p);
00773     } else {
00774       jlog("local port\n");
00775     }
00776 #endif
00777   } else if (jconf->input.speech_input == SP_MIC) {
00778     jlog("microphone\n");
00779   }
00780   if (jconf->input.speech_input != SP_MFCFILE) {
00781     if (jconf->input.speech_input == SP_RAWFILE || jconf->input.speech_input == SP_STDIN || jconf->input.speech_input == SP_ADINNET) {
00782       if (jconf->input.use_ds48to16) {
00783         jlog("\t          sampling freq. = assume 48000Hz, then down to %dHz\n", jconf->input.sfreq);
00784       } else {
00785         jlog("\t          sampling freq. = %d Hz required\n", jconf->input.sfreq);
00786       }
00787     } else {
00788       if (jconf->input.use_ds48to16) {
00789         jlog("\t          sampling freq. = 48000Hz, then down to %d Hz\n", jconf->input.sfreq);
00790       } else {
00791         jlog("\t          sampling freq. = %d Hz\n", jconf->input.sfreq);
00792       }
00793     }
00794   }
00795   if (jconf->input.speech_input != SP_MFCFILE) {
00796     jlog("\t         threaded A/D-in = ");
00797 #ifdef HAVE_PTHREAD
00798     if (recog->adin->enable_thread) {
00799       jlog("supported, on\n");
00800     } else {
00801       jlog("supported, off\n");
00802     }
00803 #else
00804     jlog("not supported (live input may be dropped)\n");
00805 #endif
00806   }
00807   if (jconf->preprocess.strip_zero_sample) {
00808     jlog("\t   zero frames stripping = on\n");
00809   } else {
00810     jlog("\t   zero frames stripping = off\n");
00811   }
00812   if (jconf->input.speech_input != SP_MFCFILE) {
00813     if (recog->adin->adin_cut_on) {
00814       jlog("\t         silence cutting = on\n");
00815       jlog("\t             level thres = %d / 32767\n", jconf->detect.level_thres);
00816       jlog("\t         zerocross thres = %d / sec.\n", jconf->detect.zero_cross_num);
00817       jlog("\t             head margin = %d msec.\n", jconf->detect.head_margin_msec);
00818       jlog("\t             tail margin = %d msec.\n", jconf->detect.tail_margin_msec);
00819     } else {
00820       jlog("\t         silence cutting = off\n");
00821     }
00822 
00823     if (jconf->preprocess.use_zmean) {
00824       jlog("\t    long-term DC removal = on");
00825       if (jconf->input.speech_input == SP_RAWFILE) {
00826         jlog(" (will compute for each file)\n");
00827       } else {
00828         jlog(" (will compute from first %.1f sec)\n", (float)ZMEANSAMPLES / (float)jconf->input.sfreq);
00829       }
00830     } else {
00831       jlog("\t    long-term DC removal = off\n");
00832     }
00833   }
00834   jlog("\t      reject short input = ");
00835   if (jconf->reject.rejectshortlen > 0) {
00836     jlog("< %d msec\n", jconf->reject.rejectshortlen);
00837   } else {
00838     jlog("off\n");
00839   }
00840 #ifdef POWER_REJECT
00841   jlog("\t   power rejection thres = %f", jconf->reject.powerthres);
00842 #endif
00843 
00844   jlog("\n");
00845 
00846   jlog("----------------------- System Information end -----------------------\n");
00847 
00848 #ifdef USE_MIC
00849   if (jconf->decodeopt.realtime_flag) {
00850     boolean flag;
00851     flag = FALSE;
00852     for(mfcc=recog->mfcclist; mfcc; mfcc=mfcc->next) {
00853       if (mfcc->para->cmn && mfcc->cmn.loaded) {
00854         flag = TRUE;
00855         break;
00856       }
00857     }
00858     if (flag) {
00859       jlog("\n");
00860       jlog("initial CMN parameter loaded from file\nfor");
00861       for(mfcc=recog->mfcclist; mfcc; mfcc=mfcc->next) {
00862         if (mfcc->para->cmn && mfcc->cmn.loaded) {
00863           jlog(" MFCC%02d", mfcc->id);
00864         }
00865       }
00866       jlog("\n");
00867     }
00868     flag = FALSE;
00869     for(mfcc=recog->mfcclist; mfcc; mfcc=mfcc->next) {
00870       if (mfcc->para->cmn && !mfcc->cmn.loaded) {
00871         flag = TRUE;
00872         break;
00873       }
00874     }
00875     if (flag) {
00876       jlog("\n");
00877       jlog("\t*************************************************************\n");
00878       jlog("\t* NOTICE: The first input may not be recognized, since      *\n");
00879       jlog("\t*         no initial CMN parameter is available on startup. *\n");
00880       jlog("\t* for");
00881       for(mfcc=recog->mfcclist; mfcc; mfcc=mfcc->next) {
00882         if (mfcc->para->cmn && !mfcc->cmn.loaded) {
00883           jlog(" MFCC%02d", mfcc->id);
00884         }
00885       }
00886       jlog("*\n");
00887       jlog("\t*************************************************************\n");
00888     }
00889     flag = FALSE;
00890     for(mfcc=recog->mfcclist; mfcc; mfcc=mfcc->next) {
00891       if (mfcc->para->energy && mfcc->para->enormal) {
00892         flag = TRUE;
00893         break;
00894       }
00895     }
00896     if (flag) {
00897       jlog("\t*************************************************************\n");
00898       jlog("\t* NOTICE: Energy normalization is activated on live input:  *\n");
00899       jlog("\t*         maximum energy of LAST INPUT will be used for it. *\n");
00900       jlog("\t*         So, the first input will not be recognized.       *\n");
00901       jlog("\t* for");
00902       for(mfcc=recog->mfcclist; mfcc; mfcc=mfcc->next) {
00903         if (mfcc->para->energy && mfcc->para->enormal) {
00904           jlog(" MFCC%02d", mfcc->id);
00905         }
00906       }
00907       jlog("*\n");
00908       jlog("\t*************************************************************\n");
00909     }
00910   }
00911 #endif
00912 }
00913 
00914 /* end of file */

Generated on Tue Dec 18 15:59:52 2007 for Julius by  doxygen 1.5.4