libjulius/src/m_usage.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 
00044 void
00045 j_output_argument_help(FILE *fp)
00046 {
00047   Jconf *jconf;
00048 
00049   /* load default values */
00050   jconf = j_jconf_new();
00051 
00052   j_put_header(fp);
00053   j_put_compile_defs(fp);
00054   fprintf(fp, "\nOptions:\n");
00055 
00056   fprintf(fp, "\n Speech Input:\n");
00057   fprintf(fp, "    (Can extract only MFCC based features from waveform)\n");
00058   fprintf(fp, "    [-input devname]    input source  (default = htkparam)\n");
00059   fprintf(fp, "         htkparam/mfcfile  HTK parameter file\n");
00060   fprintf(fp, "         file/rawfile      waveform file\n");
00061   fprintf(fp, "                           (format: %s)\n", SUPPORTED_WAVEFILE_FORMAT);
00062 #ifdef USE_MIC
00063   fprintf(fp, "         mic               microphone device\n");
00064 #endif
00065 #ifdef USE_NETAUDIO
00066   fprintf(fp, "         netaudio          DatLink/NetAudio server\n");
00067 #endif
00068   fprintf(fp, "         adinnet           adinnet client (TCP/IP)\n");
00069   fprintf(fp, "         stdin             standard input\n");
00070   fprintf(fp, "    [-filelist file]    filename of input file list\n");
00071 #ifdef USE_NETAUDIO
00072   fprintf(fp, "    [-NA host:unit]     get audio from NetAudio server at host:unit\n");
00073 #endif
00074   fprintf(fp, "    [-adport portnum]   adinnet port number to listen         (%d)\n", jconf->input.adinnet_port);
00075   fprintf(fp, "    [-smpFreq freq]     sample period in Hz                   (%ld)\n", jconf->am_root->analysis.para_default.smp_freq);
00076   fprintf(fp, "    [-smpPeriod period] sample period in 100ns unit           (%ld)\n", jconf->am_root->analysis.para_default.smp_period);
00077   fprintf(fp, "    [-48]               enable 48kHz sampling with internal down sampler (OFF)\n");
00078   fprintf(fp, "    [-zmean/-nozmean]   enable/disable DC offset removal      (OFF)\n");
00079   fprintf(fp, "    [-zmeanframe/-nozmeanframe] frame-wise DC removal like HTK(OFF)\n");
00080   fprintf(fp, "    [-nostrip]          disable stripping off zero samples\n");
00081   fprintf(fp, "    [-record dir]       record triggered speech data to dir\n");
00082   fprintf(fp, "    [-rejectshort msec] reject an input shorter than specified\n");
00083 #ifdef POWER_REJECT
00084   fprintf(fp, "    [-powerthres value] rejection threshold of average power  (%.1f)\n", jconf->reject.powerthres);
00085 #endif
00086   
00087   fprintf(fp, "\n Speech Detection: (default: on=mic/net off=files)\n");
00088   /*fprintf(fp, "    [-pausesegment]     turn on (force) pause detection\n");*/
00089   /*fprintf(fp, "    [-nopausesegment]   turn off (force) pause detection\n");*/
00090   fprintf(fp, "    [-cutsilence]       turn on (force) skipping long silence\n");
00091   fprintf(fp, "    [-nocutsilence]     turn off (force) skipping long silence\n");
00092   fprintf(fp, "    [-lv unsignedshort] input level threshold (0-32767)       (%d)\n", jconf->detect.level_thres);
00093   fprintf(fp, "    [-zc zerocrossnum]  zerocross num threshold per sec.      (%d)\n", jconf->detect.zero_cross_num);
00094   fprintf(fp, "    [-headmargin msec]  header margin length in msec.         (%d)\n", jconf->detect.head_margin_msec);
00095   fprintf(fp, "    [-tailmargin msec]  tail margin length in msec.           (%d)\n", jconf->detect.tail_margin_msec);
00096 
00097   fprintf(fp, "\n Acoustic analysis:\n");
00098   fprintf(fp, "    [-htkconf file]     load parameters from the HTK Config file\n");
00099   fprintf(fp, "    [-smpFreq freq]     sample period (Hz)                    (%ld)\n", jconf->am_root->analysis.para_default.smp_freq);
00100   fprintf(fp, "    [-smpPeriod period] sample period (100ns)                 (%ld)\n", jconf->am_root->analysis.para_default.smp_period);
00101   fprintf(fp, "    [-fsize sample]     window size (sample)                  (%d)\n", jconf->am_root->analysis.para_default.framesize);
00102   fprintf(fp, "    [-fshift sample]    frame shift (sample)                  (%d)\n", jconf->am_root->analysis.para_default.frameshift);
00103   fprintf(fp, "    [-preemph]          pre-emphasis coef.                    (%.2f)\n", jconf->am_root->analysis.para_default.preEmph);
00104   fprintf(fp, "    [-fbank]            number of filterbank channels         (%d)\n", jconf->am_root->analysis.para_default.fbank_num);
00105   fprintf(fp, "    [-ceplif]           cepstral liftering coef.              (%d)\n", jconf->am_root->analysis.para_default.lifter);
00106   fprintf(fp, "    [-rawe] [-norawe]   toggle using raw energy               (no)\n");
00107   fprintf(fp, "    [-enormal] [-noenormal] toggle normalizing log energy     (no)\n");
00108   fprintf(fp, "    [-escale]           scaling log energy for enormal        (%.1f)\n", jconf->am_root->analysis.para_default.escale);
00109   fprintf(fp, "    [-silfloor]         energy silence floor in dB            (%.1f)\n", jconf->am_root->analysis.para_default.silFloor);
00110   fprintf(fp, "    [-delwin frame]     delta windows length (frame)          (%d)\n", jconf->am_root->analysis.para_default.delWin);
00111   fprintf(fp, "    [-accwin frame]     accel windows length (frame)          (%d)\n", jconf->am_root->analysis.para_default.accWin);
00112   fprintf(fp, "    [-hifreq freq]      freq. of upper band limit, off if <0  (%d)\n", jconf->am_root->analysis.para_default.hipass);
00113   fprintf(fp, "    [-lofreq freq]      freq. of lower band limit, off if <0  (%d)\n", jconf->am_root->analysis.para_default.lopass);
00114   fprintf(fp, "    [-sscalc]           do spectral subtraction (file input only)\n");
00115   fprintf(fp, "    [-sscalclen msec]   length of head silence for SS (msec)  (%d)\n", jconf->am_root->frontend.sscalc_len);
00116   fprintf(fp, "    [-ssload filename]  load constant noise spectrum from file for SS\n");
00117   fprintf(fp, "    [-ssalpha value]    alpha coef. for SS                    (%f)\n", jconf->am_root->frontend.ss_alpha);
00118   fprintf(fp, "    [-ssfloor value]    spectral floor for SS                 (%f)\n", jconf->am_root->frontend.ss_floor);
00119 
00120   fprintf(fp, "\n GMM utterance verification:\n");
00121   fprintf(fp, "    -gmm filename       GMM definition file\n");
00122   fprintf(fp, "    -gmmnum num         GMM Gaussian pruning num              (%d)\n", jconf->reject.gmm_gprune_num);
00123   fprintf(fp, "    -gmmreject string   comma-separated list of noise model name to reject\n");
00124 #ifdef GMM_VAD
00125   fprintf(fp, "\n GMM-based VAD:\n");
00126   fprintf(fp, "    -gmmmargin frames   backstep margin on speech trigger     (%d)\n", jconf->detect.gmm_margin);
00127 #endif
00128 
00129   fprintf(fp, "\n N-gram Language model:\n");
00130   fprintf(fp, "    -d file.bingram     n-gram file in Julius binary format\n");
00131   fprintf(fp, "    -nlr file.arpa      forward n-gram file in ARPA format\n");
00132   fprintf(fp, "    -nrl file.arpa      backward n-gram file in ARPA format\n");
00133   fprintf(fp, "    [-lmp float float]  weight and penalty (tri: %.1f %.1f mono: %.1f %1.f)\n", DEFAULT_LM_WEIGHT_TRI_PASS1, DEFAULT_LM_PENALTY_TRI_PASS1, DEFAULT_LM_WEIGHT_MONO_PASS1, DEFAULT_LM_PENALTY_MONO_PASS1);
00134   fprintf(fp, "    [-lmp2 float float]       for 2nd pass (tri: %.1f %.1f mono: %.1f %1.f)\n", DEFAULT_LM_WEIGHT_TRI_PASS2, DEFAULT_LM_PENALTY_TRI_PASS2, DEFAULT_LM_WEIGHT_MONO_PASS2, DEFAULT_LM_PENALTY_MONO_PASS2);
00135   fprintf(fp, "    [-transp float]     penalty for transparent word (%+2.1f)\n", jconf->search_root->lmp.lm_penalty_trans);
00136 
00137   fprintf(fp, "\n DFA Grammar:\n");
00138   fprintf(fp, "    -dfa file.dfa       DFA grammar file\n");
00139   fprintf(fp, "    -gram file[,file2...] (list of) grammar prefix(es)\n");
00140   fprintf(fp, "    -gramlist filename  filename of grammar list\n");
00141   fprintf(fp, "    [-penalty1 float]   word insertion penalty (1st pass)     (%.1f)\n", jconf->search_root->lmp.penalty1);
00142   fprintf(fp, "    [-penalty2 float]   word insertion penalty (2nd pass)     (%.1f)\n", jconf->search_root->lmp.penalty2);
00143 
00144   fprintf(fp, "\n Word Dictionary: (for N-gram and DFA)\n");
00145   fprintf(fp, "    -v dictfile         dictionary file name\n");
00146   fprintf(fp, "    [-silhead wordname] (n-gram) beginning-of-sentence word   (%s)\n", BEGIN_WORD_DEFAULT);
00147   fprintf(fp, "    [-siltail wordname] (n-gram) end-of-sentence word         (%s)\n", END_WORD_DEFAULT);
00148   fprintf(fp, "    [-forcedict]        ignore error entry and keep running\n");
00149   fprintf(fp, "    [-iwspword]         (n-gram) add short-pause word for inter-word CD sp\n");
00150   fprintf(fp, "    [-iwspentry entry]  (n-gram) word entry for \"-iwspword\" (%s)\n", IWSPENTRY_DEFAULT);
00151   
00152   fprintf(fp, "\n Isolated Word Recognition:\n");
00153   fprintf(fp, "    -w file[,file2...]  (list of) wordlist file name(s)\n");
00154   fprintf(fp, "    -wlist filename     file that contains list of wordlists\n");
00155   fprintf(fp, "    -wsil head tail sp  name of silence/pause model\n");
00156   fprintf(fp, "                          head - BOS silence model name       (%s)\n", jconf->lm_root->wordrecog_head_silence_model_name);
00157   fprintf(fp, "                          tail - EOS silence model name       (%s)\n", jconf->lm_root->wordrecog_tail_silence_model_name);
00158   fprintf(fp, "                           sp  - their name as context or \"NULL\" (%s)\n", (jconf->lm_root->wordrecog_silence_context_name[0] == '\0') ? "NULL" : jconf->lm_root->wordrecog_silence_context_name);
00159 #ifdef DETERMINE
00160   fprintf(fp, "    -wed float int      thresholds for early word determination\n");
00161   fprintf(fp, "                        float: score threshold    (%.1f)\n", jconf->search_root->pass1.determine_score_thres);
00162   fprintf(fp, "                        int: frame duration thres (%d)\n", jconf->search_root->pass1.determine_duration_thres);
00163 #endif
00164   fprintf(fp, "\n Acoustic Model:\n");
00165   fprintf(fp, "    -h hmmdefsfile      HMM definition file name\n");
00166   fprintf(fp, "    [-hlist HMMlistfile] HMMlist filename (must for triphone model)\n");
00167   fprintf(fp, "    [-iwcd1 methodname] switch IWCD triphone handling on 1st pass\n");
00168   fprintf(fp, "             best N     use N best score (default of n-gram, N=%d)\n", jconf->am_root->iwcdmaxn);
00169   fprintf(fp, "             max        use maximum score\n");
00170   fprintf(fp, "             avg        use average score (default of dfa)\n");
00171   fprintf(fp, "    [-force_ccd]        force to handle IWCD\n");
00172   fprintf(fp, "    [-no_ccd]           don't handle IWCD\n");
00173   fprintf(fp, "    [-notypecheck]      don't check input parameter type\n");
00174   fprintf(fp, "    [-spmodel HMMname]  name of short pause model             (\"%s\")\n", SPMODEL_NAME_DEFAULT);
00175   fprintf(fp, "    [-multipath]        switch decoding for multi-path HMM    (auto)\n");
00176 
00177   fprintf(fp, "\n Acoustic Computation Method:\n");
00178   fprintf(fp, "    [-gprune methodname] select Gaussian pruning method:\n");
00179 #ifdef GPRUNE_DEFAULT_SAFE
00180   fprintf(fp, "             safe          safe pruning (default for TM/PTM)\n");
00181 #else
00182   fprintf(fp, "             safe          safe pruning\n");
00183 #endif
00184 #if GPRUNE_DEFAULT_HEURISTIC
00185   fprintf(fp, "             heuristic     heuristic pruning (default for TM/PTM)\n");
00186 #else
00187   fprintf(fp, "             heuristic     heuristic pruning\n");
00188 #endif
00189 #if GPRUNE_DEFAULT_BEAM
00190   fprintf(fp, "             beam          beam pruning (default for TM/PTM)\n");
00191 #else
00192   fprintf(fp, "             beam          beam pruning\n");
00193 #endif
00194   fprintf(fp, "             none          no pruning (default for non tmix models)\n");
00195   fprintf(fp, "    [-tmix gaussnum]    Gaussian num threshold per mixture for pruning (%d)\n", jconf->am_root->mixnum_thres);
00196   fprintf(fp, "    [-gshmm hmmdefs]    monophone hmmdefs for GS\n");
00197   fprintf(fp, "    [-gsnum N]          N-best state will be selected        (%d)\n", jconf->am_root->gs_statenum);
00198 
00199   fprintf(fp, "\n Short-pause Segmentation:\n");
00200   fprintf(fp, "    [-spsegment]        enable short-pause segmentation\n");
00201   fprintf(fp, "    [-spdur]            length threshold of sp frames         (%d)\n", jconf->search_root->successive.sp_frame_duration);
00202 #ifdef SPSEGMENT_NAIST
00203   fprintf(fp, "    [-spmargin]         backstep margin on speech trigger     (%d)\n", jconf->search_root->successive.sp_margin);
00204   fprintf(fp, "    [-spdelay]          delay on speech trigger               (%d)\n", jconf->search_root->successive.sp_delay);
00205 #endif
00206   fprintf(fp, "    [-pausemodels str]  comma-delimited list of pause models for segment\n");
00207 
00208   fprintf(fp, "\n Search Parameters (First Pass):\n");
00209   fprintf(fp, "    [-b beamwidth]      beam width (by state num)             (guessed)\n");
00210   fprintf(fp, "                        (0: full search, -1: force guess)\n");
00211 #ifdef WPAIR
00212 # ifdef WPAIR_KEEP_NLIMIT
00213   fprintf(fp, "    [-nlimit N]         keeps only N tokens on each state     (%d)\n", jconf->search_root->pass1.wpair_keep_nlimit);
00214 # endif
00215 #endif
00216 #ifdef SEPARATE_BY_UNIGRAM
00217   fprintf(fp, "    [-sepnum wordnum]   (n-gram) # of hi-freq word isolated from tree (%d)\n", jconf->lm_root->separate_wnum);
00218 #endif
00219 #ifdef HASH_CACHE_IW
00220   fprintf(fp, "    [-iwcache percent]  (n-gram) amount of inter-word LM cache (%3d)\n", jconf->search_root->pass1.iw_cache_rate);
00221 #endif
00222   fprintf(fp, "    [-1pass]            do 1st pass only, omit 2nd pass\n");
00223   fprintf(fp, "    [-inactive]         recognition process not active on startup\n");
00224 
00225   fprintf(fp, "\n Search Parameters (Second Pass):\n");
00226   fprintf(fp, "    [-b2 hyponum]       word envelope beam width (by hypo num) (%d)\n",jconf->search_root->pass2.enveloped_bestfirst_width);
00227   fprintf(fp, "    [-n N]              # of sentence to find                 (%d)\n", jconf->search_root->pass2.nbest);
00228   fprintf(fp, "    [-output N]         # of sentence to output               (%d)\n",jconf->search_root->output.output_hypo_maxnum);
00229 #ifdef SCAN_BEAM
00230   fprintf(fp, "    [-sb score]         score beam threshold (by score)       (%.1f)\n", jconf->search_root->pass2.scan_beam_thres);
00231 #endif
00232   fprintf(fp, "    [-s hyponum]        global stack size of hypotheses       (%d)\n", jconf->search_root->pass2.stack_size);
00233   fprintf(fp, "    [-m hyponum]        hypotheses overflow threshold num     (%d)\n", jconf->search_root->pass2.hypo_overflow);
00234 
00235   fprintf(fp, "    [-lookuprange N]    frame lookup range in word expansion  (%d)\n", jconf->search_root->pass2.lookup_range);
00236   fprintf(fp, "    [-looktrellis]      (dfa) expand only backtrellis words\n");
00237   fprintf(fp, "    [-[no]multigramout] (dfa) output per-grammar results\n");
00238   fprintf(fp, "    [-oldtree]          (dfa) use old build_wchmm()\n");
00239 #ifdef PASS1_IWCD
00240   fprintf(fp, "    [-oldiwcd]          (dfa) use full lcdset\n");
00241 #endif
00242   fprintf(fp, "    [-iwsp]             insert sp for all word end (multipath)(off)\n");
00243   fprintf(fp, "    [-iwsppenalty]      trans. penalty for iwsp (multipath)   (%.1f)\n", jconf->am_root->iwsp_penalty);
00244 
00245   fprintf(fp, "\n Graph Output with graph-oriented search:\n");
00246   fprintf(fp, "    [-lattice]          enable word graph (lattice) output\n");
00247   fprintf(fp, "    [-confnet]          enable confusion network output\n");
00248   fprintf(fp, "    [-nolattice]][-noconfnet] disable lattice / confnet output\n");
00249   fprintf(fp, "    [-graphrange N]     merge same words in graph (%d)\n", jconf->search_root->graph.graph_merge_neighbor_range);
00250   fprintf(fp, "                        -1: not merge, leave same loc. with diff. score\n");
00251   fprintf(fp, "                         0: merge same words at same location\n");
00252   fprintf(fp, "                        >0: merge same words around the margin\n");
00253 #ifdef GRAPHOUT_DEPTHCUT
00254   fprintf(fp, "    [-graphcut num]     graph cut depth at postprocess (-1: disable)(%d)\n", jconf->search_root->graph.graphout_cut_depth);
00255 #endif
00256 #ifdef GRAPHOUT_LIMIT_BOUNDARY_LOOP
00257   fprintf(fp, "    [-graphboundloop num] max. num of boundary adjustment loop (%d)\n", jconf->search_root->graph.graphout_limit_boundary_loop_num);
00258 #endif
00259 #ifdef GRAPHOUT_SEARCH_DELAY_TERMINATION
00260   fprintf(fp, "    [-graphsearchdelay] inhibit search termination until 1st sent. found\n");
00261   fprintf(fp, "    [-nographsearchdelay] disable it (default)\n");
00262 #endif
00263 
00264   fprintf(fp, "\n On-the-fly Decoding: (default: on=mic/net off=files)\n");
00265   fprintf(fp, "    [-realtime]         turn on, input streamed with MAP-CMN\n");
00266   fprintf(fp, "    [-norealtime]       turn off, input buffered with sentence CMN\n");
00267   fprintf(fp, "    [-cmnload file]     load initial CMN param from file on startup\n");
00268   fprintf(fp, "    [-cmnsave file]     save CMN param to file after each input\n");
00269   fprintf(fp, "    [-cmnnoupdate]      not update CMN param while recog. (use with -cmnload)\n");
00270   fprintf(fp, "    [-cmnmapweight]     weight value of initial cm for MAP-CMN (%6.2f)\n", jconf->am_root->analysis.cmn_map_weight);
00271 
00272   fprintf(fp, "\n Forced Alignment:\n");
00273   fprintf(fp, "    [-walign]           optionally output word alignments\n");
00274   fprintf(fp, "    [-palign]           optionally output phoneme alignments\n");
00275   fprintf(fp, "    [-salign]           optionally output state alignments\n");
00276 #ifdef CONFIDENCE_MEASURE
00277   fprintf(fp, "\n Confidence Score:\n");
00278 #ifdef CM_MULTIPLE_ALPHA
00279   fprintf(fp, "    [-cmalpha f t s]    CM smoothing factor        (from, to, step)\n");
00280 #else
00281   fprintf(fp, "    [-cmalpha value]    CM smoothing factor                    (%f)\n", jconf->search_root->annotate.cm_alpha);
00282 #endif
00283 #ifdef CM_SEARCH_LIMIT
00284   fprintf(fp, "    [-cmthres value]    CM threshold to cut hypo on 2nd pass   (%f)\n", jconf->search_root->annotate.cm_cut_thres);
00285 #endif
00286 #endif /* CONFIDENCE_MEASURE */
00287   fprintf(fp, "\n Message Output:\n");
00288   fprintf(fp, "    [-separatescore]    (n-gram) output LM and AM score independently\n");
00289   fprintf(fp, "    [-quiet]            reduce output to only word string\n");
00290   fprintf(fp, "    [-progout]          progressive output in 1st pass\n");
00291   fprintf(fp, "    [-proginterval]     interval of progout in msec           (%d)\n", jconf->search_root->output.progout_interval);
00292   fprintf(fp, "    [-demo]             equal to \"-quiet -progout\"\n");
00293   fprintf(fp, "\n Others:\n");
00294   fprintf(fp, "    [-C jconffile]      load options from jconf file\n");
00295   fprintf(fp, "    [-debug]            (for debug) dump numerous log\n");
00296   fprintf(fp, "    [-check (wchmm|trellis)] (for debug) check internal structure\n");
00297   fprintf(fp, "    [-check triphone]   triphone mapping check\n");
00298   fprintf(fp, "    [-setting]          print engine configuration and exit\n");
00299   fprintf(fp, "    [-help]             print this message and exit\n");
00300 
00301   j_jconf_free(jconf);
00302 
00303   /* output application-side options */
00304   useropt_show_desc(fp);
00305 
00306 }
00307 
00308 /* end of file */

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