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