00001
00017
00018
00019
00020
00021
00022
00023
00024 #include <julius.h>
00025
00036 void
00037 opt_terminate()
00038 {
00039 j_error("Try `-help' for more information.\n");
00040 }
00041
00052 void
00053 usage()
00054 {
00055 put_version(stderr);
00056 j_printerr("Try '-setting' for built-in engine configuration.\n");
00057 j_printerr("Try '-help' for run time options.\n");
00058 j_exit();
00059 }
00060
00071 void
00072 detailed_help()
00073 {
00074 put_header(stdout);
00075 put_compile_defs(stdout);
00076 j_printf("\nOptions:\n");
00077
00078 j_printf("\n Speech Input:\n");
00079 j_printf(" (Only MFCC acoustic model can recognize waveform directly)\n");
00080 j_printf(" [-input devname] input from: (default = htkparam)\n");
00081 j_printf(" htkparam/mfcfile HTK parameter file\n");
00082 j_printf(" file/rawfile waveform file (16bit,mono,linear)\n");
00083 j_printf(" supported file types:\n");
00084 j_printf(" %s\n", SUPPORTED_WAVEFILE_FORMAT);
00085 #ifdef USE_MIC
00086 j_printf(" mic microphone device\n");
00087 #endif
00088 #ifdef USE_NETAUDIO
00089 j_printf(" netaudio DatLink/NetAudio server\n");
00090 #endif
00091 j_printf(" adinnet adinnet client (TCP/IP)\n");
00092 j_printf(" stdin standard input\n");
00093 j_printf(" [-filelist file] input file list\n");
00094 #ifdef USE_NETAUDIO
00095 j_printf(" [-NA host:unit] netaudio server address\n");
00096 #endif
00097 j_printf(" [-adport portnum] adinnet portnum to listen (%d)\n", adinnet_port);
00098 j_printf(" [-smpFreq freq] sample period (Hz) (%d)\n", para_default.smp_freq);
00099 j_printf(" [-smpPeriod period] sample period (100ns unit) (%d)\n", para_default.smp_period);
00100 j_printf(" [-zmean/-nozmean] enable/disable DC offset removal (OFF)\n");
00101 j_printf(" [-zmeanframe/-nozmeanframe] frame-wise DC offset removal (OFF)\n");
00102 j_printf(" [-nostrip] not strip off zero samples\n");
00103 j_printf(" [-record dir] save recognized speech data to dir\n");
00104 j_printf(" [-rejectshort msec] reject short input\n");
00105
00106 j_printf("\n Speech Detection: (default: on=mic/net off=files)\n");
00107
00108
00109 j_printf(" [-cutsilence] turn on (force) long silence cutting\n");
00110 j_printf(" [-nocutsilence] turn off (force) long silence cutting\n");
00111 j_printf(" [-lv unsignedshort] level threshold (0-32767) (%d)\n", level_thres);
00112 j_printf(" [-zc zerocrossnum] zerocross num threshold (per sec.) (%d)\n", zero_cross_num);
00113 j_printf(" [-headmargin msec] header margin length in msec. (%d)\n", head_margin_msec);
00114 j_printf(" [-tailmargin msec] tail margin length in msec. (%d)\n", tail_margin_msec);
00115
00116 j_printf("\n Acoustic analysis:\n");
00117 j_printf(" [-htkconf file] read parameters from HTK Config file\n");
00118 j_printf(" (specifying options below will override it)\n");
00119 j_printf(" [-smpFreq freq] sample period (Hz) (%d)\n", para_default.smp_freq);
00120 j_printf(" [-smpPeriod period] sample period (100ns) (%d)\n", para_default.smp_period);
00121 j_printf(" [-fsize sample] window size (sample) (%d)\n", para_default.framesize);
00122 j_printf(" [-fshift sample] frame shift (sample) (%d)\n", para_default.frameshift);
00123 j_printf(" [-preemph] pre-emphasis coef. (%.2f)\n", para_default.preEmph);
00124 j_printf(" [-fbank] number of filterbank channels (%d)\n", para_default.fbank_num);
00125 j_printf(" [-ceplif] cepstral liftering coef. (%d)\n", para_default.lifter);
00126 j_printf(" [-rawe] [-norawe] toggle using raw energy (not use)\n");
00127 j_printf(" [-enormal] [-noenormal] toggle normalizing log energy (not normalize)\n");
00128 j_printf(" (cannot set -enormal when live input)\n");
00129 j_printf(" [-escale] scaling log energy for enormal (%.1f)\n", para_default.escale);
00130 j_printf(" [-silfloor] energy silence floor in dB (%.1f)\n", para_default.silFloor);
00131 j_printf(" [-delwin frame] delta windows length (frame) (%d)\n", para_default.delWin);
00132 j_printf(" [-accwin frame] accel windows length (frame) (%d)\n", para_default.accWin);
00133 j_printf(" [-hifreq freq] freq. of upper band limit, off if <0 (%d)\n", para_default.hipass);
00134 j_printf(" [-lofreq freq] freq. of lower band limit, off if <0 (%d)\n", para_default.lopass);
00135 j_printf(" [-sscalc] do spectral subtraction (file input only)\n");
00136 j_printf(" [-sscalclen msec] length of head silence for SS (msec) (%d)\n", sscalc_len);
00137 j_printf(" [-ssload filename] load constant noise spectrum from file for SS\n");
00138 j_printf(" [-ssalpha value] alpha coef. for SS (%f)\n", para_default.ss_alpha);
00139 j_printf(" [-ssfloor value] spectral floor for SS (%f)\n", para_default.ss_floor);
00140
00141 j_printf("\n GMM utterance verification:\n");
00142 j_printf(" -gmm filename GMM definition file\n");
00143 j_printf(" -gmmnum num GMM Gaussian pruning num (%d)\n", gmm_gprune_num);
00144 j_printf(" -gmmreject string list of GMMs for rejection (cancel pass2, keep CM)\n");
00145
00146 #ifdef USE_NGRAM
00147 j_printf("\n N-gram Language model (\"-d\" or \"-nlr -nrl\" needed):\n");
00148 j_printf(" -d file.bingram n-gram file name in Julius binary format\n");
00149 j_printf(" -nlr file.arpa 2-gram file name in ARPA format\n");
00150 j_printf(" -nrl file.arpa reverse 3-gram file name in ARPA format\n");
00151 j_printf(" [-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);
00152 j_printf(" [-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);
00153 j_printf(" [-transp float] penalty for transparent word (%+2.1f)\n", lm_penalty_trans);
00154 #else
00155 j_printf("\n Grammar:\n");
00156 j_printf(" -dfa file.dfa DFA grammar file\n");
00157 j_printf(" -gram file[,file2...] (list of) grammar prefix\n");
00158 j_printf(" -gramlist filename filename of grammar list\n");
00159 j_printf(" [-penalty1 float] word insertion penalty (1st pass) (%.1f)\n", penalty1);
00160 j_printf(" [-penalty2 float] word insertion penalty (2nd pass) (%.1f)\n", penalty1);
00161 #endif
00162
00163 j_printf("\n Word Dictionary:\n");
00164 j_printf(" -v dictfile dictionary file name\n");
00165 #ifdef USE_NGRAM
00166 j_printf(" [-silhead wordname] specify beginning-of-sentence word (%s)\n", BEGIN_WORD_DEFAULT);
00167 j_printf(" [-siltail wordname] specify end-of-sentence word (%s)\n", END_WORD_DEFAULT);
00168 #endif
00169 j_printf(" [-forcedict] not terminate on error words, just ignore\n");
00170 #ifdef USE_NGRAM
00171 j_printf(" [-iwspword] add an sp-word to the vocabulary for inter-word CD sp\n");
00172 j_printf(" [-iwspentry dictentry] specify content of the iwspword (%s)\n", IWSPENTRY_DEFAULT);
00173 #endif
00174
00175 j_printf("\n Acoustic Model:\n");
00176 j_printf(" -h hmmdefsfile HMM definition file name\n");
00177 j_printf(" [-hlist HMMlistfile] HMMlist filename (must for triphone model)\n");
00178 j_printf(" [-iwcd1 methodname] switch IWCD triphone handling on 1st pass\n");
00179 #ifdef USE_NGRAM
00180 j_printf(" best N use N best score (default, N=%d)\n", iwcdmaxn);
00181 j_printf(" max use maximum score\n");
00182 j_printf(" avg use average score\n");
00183 #else
00184 j_printf(" best N use N best score (N=%d by default)\n", iwcdmaxn);
00185 j_printf(" max use maximum score\n");
00186 j_printf(" avg use average score (default)\n");
00187 #endif
00188 j_printf(" [-force_ccd] force to handle IWCD\n");
00189 j_printf(" [-no_ccd] don't handle IWCD\n");
00190 j_printf(" [-notypecheck] don't check input parameter type\n");
00191 j_printf(" [-spmodel HMMname] name of short pause model (\"%s\")\n", SPMODEL_NAME_DEFAULT);
00192
00193 j_printf("\n Acoustic Computation Method:\n");
00194 j_printf(" [-gprune methodname] select Gaussian pruning method:\n");
00195 #ifdef GPRUNE_DEFAULT_SAFE
00196 j_printf(" safe safe pruning (default for TM/PTM)\n");
00197 #else
00198 j_printf(" safe safe pruning\n");
00199 #endif
00200 #if GPRUNE_DEFAULT_HEURISTIC
00201 j_printf(" heuristic heuristic pruning (default for TM/PTM)\n");
00202 #else
00203 j_printf(" heuristic heuristic pruning\n");
00204 #endif
00205 #if GPRUNE_DEFAULT_BEAM
00206 j_printf(" beam beam pruning (default for TM/PTM)\n");
00207 #else
00208 j_printf(" beam beam pruning\n");
00209 #endif
00210 j_printf(" none no pruning (default for non tmix models)\n");
00211 j_printf(" [-tmix gaussnum] Gaussian num threshold per mixture for pruning (%d)\n", mixnum_thres);
00212 j_printf(" [-gshmm hmmdefs] monophone hmmdefs for GS\n");
00213 j_printf(" [-gsnum N] N-best state will be selected (%d)\n", gs_statenum);
00214
00215 #ifdef SP_BREAK_CURRENT_FRAME
00216 j_printf("\n Short-pause Segmentation:\n");
00217 j_printf(" [-spdur] length threshold of sp frames (%d)\n", sp_frame_duration);
00218 #endif
00219
00220 j_printf("\n Search Parameters (First Pass):\n");
00221 j_printf(" [-b beamwidth] beam width (by state num) (guessed)\n");
00222 j_printf(" (0: full search, -1: force guess)\n");
00223 #ifdef WPAIR
00224 # ifdef WPAIR_KEEP_NLIMIT
00225 j_printf(" [-nlimit N] keeps only N tokens on each state (%d)\n", wpair_keep_nlimit);
00226 # endif
00227 #endif
00228 #ifdef USE_NGRAM
00229 #ifdef SEPARATE_BY_UNIGRAM
00230 j_printf(" [-sepnum wordnum] # of hi-freq word isolated from tree (%d)\n", separate_wnum);
00231 #endif
00232 #ifdef HASH_CACHE_IW
00233 j_printf(" [-iwcache percent] amount of inter-word LM cache (%3d)\n", iw_cache_rate);
00234 #endif
00235 #endif
00236 j_printf(" [-1pass] do 1st pass only, omit 2nd pass\n");
00237
00238 j_printf("\n Search Parameters (Second Pass):\n");
00239 j_printf(" [-b2 hyponum] word envelope beam width (by hypo num) (%d)\n",enveloped_bestfirst_width);
00240 j_printf(" [-n N] # of sentence to find (%d)\n", nbest);
00241 j_printf(" [-output N] # of sentence to output (%d)\n",output_hypo_maxnum);
00242 #ifdef SCAN_BEAM
00243 j_printf(" [-sb score] score beam threshold (by score) (%.1f)\n", scan_beam_thres);
00244 #endif
00245 j_printf(" [-s hyponum] global stack size of hypotheses (%d)\n", stack_size);
00246 j_printf(" [-m hyponum] hypotheses overflow threshold num (%d)\n", hypo_overflow);
00247
00248 j_printf(" [-lookuprange N] frame lookup range in word expansion (%d)\n", lookup_range);
00249 #ifdef USE_DFA
00250 j_printf(" [-looktrellis] expand only backtrellis words\n");
00251 j_printf(" [-[no]multigramout] output per-grammar results\n");
00252 #endif
00253 #ifdef CATEGORY_TREE
00254 j_printf(" [-oldtree] use old build_wchmm()\n");
00255 #ifdef PASS1_IWCD
00256 j_printf(" [-oldiwcd] use full lcdset\n");
00257 #endif
00258 #endif
00259 #ifdef MULTIPATH_VERSION
00260 j_printf(" [-iwsp] turn on inter-word short pause handling (off)\n");
00261 j_printf(" [-iwsppenalty] trans. penalty for inter-word sp (%.1f)\n", iwsp_penalty);
00262 #endif
00263
00264 #ifdef GRAPHOUT
00265 j_printf("\n Graph Output:\n");
00266 j_printf(" [-graphrange N] merge same words in graph (%d)\n", graph_merge_neighbor_range);
00267 j_printf(" -1: not merge, leave same loc. with diff. score\n");
00268 j_printf(" 0: merge same words at same location\n");
00269 j_printf(" >0: merge same words around the margin\n");
00270 #ifdef GRAPHOUT_DEPTHCUT
00271 j_printf(" [-graphcut num] graph cut depth at postprocess (-1: disable)(%d)\n", graphout_cut_depth);
00272 #endif
00273 #ifdef GRAPHOUT_LIMIT_BOUNDARY_LOOP
00274 j_printf(" [-graphboundloop num] max. num of boundary adjustment loop (%d)\n", graphout_limit_boundary_loop_num);
00275 #endif
00276 #ifdef GRAPHOUT_SEARCH_DELAY_TERMINATION
00277 j_printf(" [-graphsearchdelay] inhibit search termination until 1st sent. found\n");
00278 j_printf(" [-nographsearchdelay] disable it (default)\n");
00279 #endif
00280 #endif
00281
00282 j_printf("\n On-the-fly Decoding: (default: on=mic/net off=files)\n");
00283 j_printf(" [-realtime] turn on, input streamed with MAP-CMN\n");
00284 j_printf(" [-norealtime] turn off, input buffered with sentence CMN\n");
00285 j_printf(" [-cmnload file] load initial CMN param from file on startup\n");
00286 j_printf(" [-cmnsave file] save CMN param to file after each input\n");
00287 j_printf(" [-cmnnoupdate] not update CMN param while recog. (use with -cmnload)\n");
00288 j_printf(" [-cmnmapweight] weight value of initial cm for MAP-CMN (%6.2f)\n", cmn_map_weight);
00289
00290 j_printf("\n Forced Alignment:\n");
00291 j_printf(" [-walign] optionally output word alignments\n");
00292 j_printf(" [-palign] optionally output phoneme alignments\n");
00293 j_printf(" [-salign] optionally output state alignments\n");
00294 #ifdef CONFIDENCE_MEASURE
00295 j_printf("\n Confidence Score:\n");
00296 #ifdef CM_MULTIPLE_ALPHA
00297 j_printf(" [-cmalpha f t s] CM smoothing factor (from, to, step)\n");
00298 #else
00299 j_printf(" [-cmalpha value] CM smoothing factor (%f)\n", cm_alpha);
00300 #endif
00301 #ifdef CM_SEARCH_LIMIT
00302 j_printf(" [-cmthres value] CM threshold to cut hypo on 2nd pass (%f)\n", cm_cut_thres);
00303 #endif
00304 #endif
00305 j_printf("\n Output:\n");
00306 j_printf(" [-result devname] output recognition result to: (tty)\n");
00307 j_printf(" tty plain text to standard out\n");
00308 j_printf(" msock module socket\n");
00309 j_printf("\n Server Module Mode:\n");
00310 j_printf(" [-module [port]] enable server module mode (%d)\n", module_port);
00311 j_printf(" (implies \"-result msock\")\n");
00312 #ifdef CONFIDENCE_MEASURE
00313 j_printf(" [-outcode WLPSCwlps] select info to output to the module\n");
00314 j_printf(" (Word,Lang,Phone,Score,Confidence low=1st pass)\n");
00315 #else
00316 j_printf(" [-outcode WLPSwlps] select info to output to the module\n");
00317 j_printf(" (Word,Lang,Phone,Score, lower == 1st pass)\n");
00318 #endif
00319 j_printf("\n Message Output:\n");
00320 #ifdef USE_NGRAM
00321 j_printf(" [-separatescore] output LM and AM score independently\n");
00322 #endif
00323 j_printf(" [-quiet] reduce output to only word string\n");
00324 j_printf(" [-progout] progressive output in 1st pass\n");
00325 j_printf(" [-proginterval] interval of progout in msec (%d)\n", progout_interval);
00326 j_printf(" [-demo] equal to \"-quiet -progout\"\n");
00327 #ifdef CHARACTER_CONVERSION
00328 j_printf(" [-charconv from to] convert output character set from [from] to [to]\n");
00329 #ifdef USE_LIBJCODE
00330 j_printf(" (support only Japanese sets: euc,sjis,jis)\n");
00331 #endif
00332 j_printf(" [-nocharconv] disable output code conversion (default)\n");
00333 #endif
00334 j_printf("\n Others:\n");
00335 j_printf(" [-C jconffile] load options from jconf file\n");
00336 j_printf(" [-debug] (for debug) dump numerous log\n");
00337 j_printf(" [-check (wchmm|trellis)] (for debug) check internal structure\n");
00338 j_printf(" [-check triphone] triphone mapping check\n");
00339 j_printf(" [-setting] print engine configuration and exit\n");
00340 j_printf(" [-help] print this message and exit\n");
00341 j_exit();
00342 }