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(" [-input devname] speech input from: (mfcfile)\n");
00080 j_printf(" mfcfile HTK parameter file\n");
00081 j_printf(" (raw inputs below allowed for MFCC_{0|E}_D[_N]_Z AM only)\n");
00082 j_printf(" rawfile wave 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", smpFreq);
00099 j_printf(" [-smpPeriod period] sample period (100ns) (%d)\n", smpPeriod);
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(" [-smpFreq freq] sample period (Hz) (%d)\n", smpFreq);
00118 j_printf(" [-smpPeriod period] sample period (100ns) (%d)\n", smpPeriod);
00119 j_printf(" [-fsize sample] window size (sample) (%d)\n", fsize);
00120 j_printf(" [-fshift sample] frame shift (sample) (%d)\n", fshift);
00121 j_printf(" [-preemph] pre-emphasis coef. (%.2f)\n", preemph);
00122 j_printf(" [-fbank] number of filterbank channels (%d)\n", fbank_num);
00123 j_printf(" [-ceplif] cepstral liftering coef. (%d)\n", ceplifter);
00124 j_printf(" [-rawe] [-norawe] toggle using raw energy (not use)\n");
00125 j_printf(" [-enormal] [-noenormal] toggle normalizing log energy (not normalize)\n", preemph);
00126 j_printf(" (cannot set -enormal when live input)\n");
00127 j_printf(" [-escale] scaling log energy for enormal (%.1f)\n", enormal_escale);
00128 j_printf(" [-silfloor] energy silence floor in dB (%.1f)\n", enormal_silfloor);
00129 j_printf(" [-delwin frame] delta windows length (frame) (%d)\n", delwin);
00130 j_printf(" [-accwin frame] accel windows length (frame) (%d)\n", accwin);
00131 j_printf(" [-hifreq freq] freq. of upper band limit, off if <0 (%d)\n", hipass);
00132 j_printf(" [-lofreq freq] freq. of lower band limit, off if <0 (%d)\n", lopass);
00133 j_printf(" [-sscalc] do spectral subtraction (file input only)\n");
00134 j_printf(" [-sscalclen msec] length of head silence for SS (msec) (%d)\n", sscalc_len);
00135 j_printf(" [-ssload filename] load constant noise spectrum from file for SS\n");
00136 j_printf(" [-ssalpha value] alpha coef. for SS (%f)\n", ssalpha);
00137 j_printf(" [-ssfloor value] spectral floor for SS (%f)\n", ssfloor);
00138
00139 j_printf("\n GMM utterance verification:\n");
00140 j_printf(" -gmm filename GMM definition file\n");
00141 j_printf(" -gmmnum num GMM Gaussian pruning num (%d)\n", gmm_gprune_num);
00142 j_printf(" -gmmreject string list of GMMs for rejection (cancel pass2, keep CM)\n");
00143
00144 #ifdef USE_NGRAM
00145 j_printf("\n N-gram Language model (\"-d\" or \"-nlr -nrl\" needed):\n");
00146 j_printf(" -d file.bingram n-gram file name in Julius binary format\n");
00147 j_printf(" -nlr file.arpa 2-gram file name in ARPA format\n");
00148 j_printf(" -nrl file.arpa reverse 3-gram file name in ARPA format\n");
00149 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);
00150 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);
00151 j_printf(" [-transp float] penalty for transparent word (%+2.1f)\n", lm_penalty_trans);
00152 #else
00153 j_printf("\n Grammar:\n");
00154 j_printf(" -dfa file.dfa DFA grammar file\n");
00155 j_printf(" -gram file[,file2...] (list of) grammar prefix\n");
00156 j_printf(" -gramlist filename filename of grammar list\n");
00157 j_printf(" [-penalty1 float] word insertion penalty (1st pass) (%.1f)\n", penalty1);
00158 j_printf(" [-penalty2 float] word insertion penalty (2nd pass) (%.1f)\n", penalty1);
00159 #endif
00160
00161 j_printf("\n Word Dictionary:\n");
00162 j_printf(" -v dictfile dictionary file name\n");
00163 #ifdef USE_NGRAM
00164 j_printf(" [-silhead wordname] specify beginning-of-sentence word (%s)\n", head_silname);
00165 j_printf(" [-siltail wordname] specify end-of-sentence word (%s)\n", tail_silname);
00166 #endif
00167 j_printf(" [-forcedict] not terminate on error words, just ignore\n");
00168 #ifdef USE_NGRAM
00169 j_printf(" [-iwspword] add an sp-word to the vocabulary for inter-word CD sp\n");
00170 j_printf(" [-iwspentry dictentry] specify content of the iwspword (%s)\n", iwspentry);
00171 #endif
00172
00173 j_printf("\n Acoustic Model:\n");
00174 j_printf(" -h hmmdefsfile HMM definition file name\n");
00175 j_printf(" [-hlist HMMlistfile] HMMlist filename (must for triphone model)\n");
00176 j_printf(" [-iwcd1 methodname] switch IWCD triphone handling on 1st pass\n");
00177 #ifdef USE_NGRAM
00178 j_printf(" best N use N best score (default, N=%d)\n", iwcdmaxn);
00179 j_printf(" max use maximum score\n");
00180 j_printf(" avg use average score\n");
00181 #else
00182 j_printf(" best N use N best score (N=%d by default)\n", iwcdmaxn);
00183 j_printf(" max use maximum score\n");
00184 j_printf(" avg use average score (default)\n");
00185 #endif
00186 j_printf(" [-force_ccd] force to handle IWCD\n");
00187 j_printf(" [-no_ccd] don't handle IWCD\n");
00188 j_printf(" [-notypecheck] don't check input parameter type\n");
00189 j_printf(" [-spmodel HMMname] name of short pause model (\"%s\")\n",spmodel_name);
00190
00191 j_printf("\n Acoustic Computation Method:\n");
00192 j_printf(" [-gprune methodname] select Gaussian pruning method:\n");
00193 #ifdef GPRUNE_DEFAULT_SAFE
00194 j_printf(" safe safe pruning (default for TM/PTM)\n");
00195 #else
00196 j_printf(" safe safe pruning\n");
00197 #endif
00198 #if GPRUNE_DEFAULT_HEURISTIC
00199 j_printf(" heuristic heuristic pruning (default for TM/PTM)\n");
00200 #else
00201 j_printf(" heuristic heuristic pruning\n");
00202 #endif
00203 #if GPRUNE_DEFAULT_BEAM
00204 j_printf(" beam beam pruning (default for TM/PTM)\n");
00205 #else
00206 j_printf(" beam beam pruning\n");
00207 #endif
00208 j_printf(" none no pruning (default for non tmix models)\n");
00209 j_printf(" [-tmix gaussnum] Gaussian num threshold per mixture for pruning (%d)\n", mixnum_thres);
00210 j_printf(" [-gshmm hmmdefs] monophone hmmdefs for GS\n");
00211 j_printf(" [-gsnum N] N-best state will be selected (%d)\n", gs_statenum);
00212
00213 #ifdef SP_BREAK_CURRENT_FRAME
00214 j_printf("\n Short-pause Segmentation:\n");
00215 j_printf(" [-spdur] length threshold of sp frames (%d)\n", sp_frame_duration);
00216 #endif
00217
00218 j_printf("\n Search Parameters (First Pass):\n");
00219 j_printf(" [-b beamwidth] beam width (by state num) (guessed)\n");
00220 j_printf(" (0: full search, -1: force guess)\n");
00221 #ifdef WPAIR
00222 # ifdef WPAIR_KEEP_NLIMIT
00223 j_printf(" [-nlimit N] keeps only N tokens on each state (%d)\n", wpair_keep_nlimit);
00224 # endif
00225 #endif
00226 #ifdef USE_NGRAM
00227 #ifdef SEPARATE_BY_UNIGRAM
00228 j_printf(" [-sepnum wordnum] # of hi-freq word isolated from tree (%d)\n", separate_wnum);
00229 #endif
00230 #ifdef HASH_CACHE_IW
00231 j_printf(" [-iwcache percent] amount of inter-word LM cache (%3d)\n", iw_cache_rate);
00232 #endif
00233 #endif
00234 j_printf(" [-1pass] do 1st pass only, omit 2nd pass\n");
00235
00236 j_printf("\n Search Parameters (Second Pass):\n");
00237 j_printf(" [-b2 hyponum] word envelope beam width (by hypo num) (%d)\n",enveloped_bestfirst_width);
00238 j_printf(" [-n N] # of sentence to find (%d)\n", nbest);
00239 j_printf(" [-output N] # of sentence to output (%d)\n",output_hypo_maxnum);
00240 #ifdef SCAN_BEAM
00241 j_printf(" [-sb score] score beam threshold (by score) (%.1f)\n", scan_beam_thres);
00242 #endif
00243 j_printf(" [-s hyponum] global stack size of hypotheses (%d)\n", stack_size);
00244 j_printf(" [-m hyponum] hypotheses overflow threshold num (%d)\n", hypo_overflow);
00245
00246 j_printf(" [-lookuprange N] frame lookup range in word expansion (%d)\n", lookup_range);
00247 #ifdef GRAPHOUT
00248 j_printf(" [-graphrange N] range for post-merging of graph word (%d)\n", graph_merge_neighbor_range);
00249 #endif
00250 #ifdef USE_DFA
00251 j_printf(" [-looktrellis] expand only backtrellis words\n");
00252 j_printf(" [-[no]multigramout] output per-grammar results\n");
00253 #endif
00254 #ifdef CATEGORY_TREE
00255 j_printf(" [-oldtree] use old build_wchmm()\n");
00256 #ifdef PASS1_IWCD
00257 j_printf(" [-oldiwcd] use full lcdset\n");
00258 #endif
00259 #endif
00260 #ifdef MULTIPATH_VERSION
00261 j_printf(" [-iwsp] turn on inter-word short pause handling (off)\n");
00262 j_printf(" [-iwsppenalty] trans. penalty for inter-word sp (%.1f)\n", iwsp_penalty);
00263 #endif
00264
00265 j_printf("\n On-the-fly Decoding: (default: on=mic/net off=files)\n");
00266 j_printf(" [-realtime] turn on, input streamed with MAP-CMN\n");
00267 j_printf(" [-norealtime] turn off, input buffered with sentence CMN\n");
00268 j_printf(" [-cmnload file] load initial CMN param from file on startup\n");
00269 j_printf(" [-cmnsave file] save CMN param to file after each input\n");
00270 j_printf(" [-cmnnoupdate] not update CMN param while recog. (use with -cmnload)\n");
00271 j_printf(" [-cmnmapweight] weight value of initial cm for MAP-CMN (%6.2f)\n", cmn_map_weight);
00272
00273 j_printf("\n Forced Alignment:\n");
00274 j_printf(" [-walign] optionally output word alignments\n");
00275 j_printf(" [-palign] optionally output phoneme alignments\n");
00276 j_printf(" [-salign] optionally output state alignments\n");
00277 #ifdef CONFIDENCE_MEASURE
00278 j_printf("\n Confidence Score:\n");
00279 #ifdef CM_MULTIPLE_ALPHA
00280 j_printf(" [-cmalpha f t s] CM smoothing factor (from, to, step)\n");
00281 #else
00282 j_printf(" [-cmalpha value] CM smoothing factor (%f)\n", cm_alpha);
00283 #endif
00284 #ifdef CM_SEARCH_LIMIT
00285 j_printf(" [-cmthres value] CM threshold to cut hypo on 2nd pass (%f)\n", cm_cut_thres);
00286 #endif
00287 #endif
00288 j_printf("\n Output:\n");
00289 j_printf(" [-result devname] output recognition result to: (tty)\n");
00290 j_printf(" tty plain text to standard out\n");
00291 j_printf(" msock module socket\n");
00292 j_printf("\n Server Module Mode:\n");
00293 j_printf(" [-module [port]] enable server module mode (%d)\n", module_port);
00294 j_printf(" (implies \"-result msock\")\n");
00295 #ifdef CONFIDENCE_MEASURE
00296 j_printf(" [-outcode WLPSCwlps] select info to output to the module\n");
00297 j_printf(" (Word,Lang,Phone,Score,Confidence low=1st pass)\n");
00298 #else
00299 j_printf(" [-outcode WLPSwlps] select info to output to the module\n");
00300 j_printf(" (Word,Lang,Phone,Score, lower == 1st pass)\n");
00301 #endif
00302 j_printf("\n Message Output:\n");
00303 #ifdef USE_NGRAM
00304 j_printf(" [-separatescore] output LM and AM score independently\n");
00305 #endif
00306 j_printf(" [-quiet] reduce output to only word string\n");
00307 j_printf(" [-progout] progressive output in 1st pass\n");
00308 j_printf(" [-proginterval] interval of progout in msec (%d)\n", progout_interval);
00309 j_printf(" [-demo] equal to \"-quiet -progout\"\n");
00310 #ifdef CHARACTER_CONVERSION
00311 j_printf(" [-charconv from to] convert output character set from [from] to [to]\n");
00312 #ifdef USE_LIBJCODE
00313 j_printf(" (support only Japanese sets: euc,sjis,jis)\n");
00314 #endif
00315 j_printf(" [-nocharconv] disable output code conversion (default)\n");
00316 #endif
00317 j_printf("\n Others:\n");
00318 j_printf(" [-C jconffile] load options from jconf file\n");
00319 j_printf(" [-debug] (for debug) dump numerous log\n");
00320 j_printf(" [-check (wchmm|trellis)] (for debug) check internal structure\n");
00321 j_printf(" [-check triphone] triphone mapping check\n");
00322 j_printf(" [-setting] print engine configuration and exit\n");
00323 j_printf(" [-help] print this message and exit\n");
00324 j_exit();
00325 }