1 /* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 /* ==================================================================== 3 * Copyright (c) 1999-2004 Carnegie Mellon University. All rights 4 * reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * 18 * This work was supported in part by funding from the Defense Advanced 19 * Research Projects Agency and the National Science Foundation of the 20 * United States of America, and the CMU Sphinx Speech Consortium. 21 * 22 * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 23 * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 24 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 25 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 26 * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * 34 * ==================================================================== 35 * 36 */ 37 /* 38 * cmdln_macro.h -- Corpus-file related misc functions. 39 * 40 * ********************************************** 41 * CMU ARPA Speech Project 42 * 43 * Copyright (c) 1996 Carnegie Mellon University. 44 * ALL RIGHTS RESERVED. 45 * ********************************************** 46 * 47 * HISTORY 48 * $Log$ 49 * Revision 1.1 2006/04/05 20:27:30 dhdfu 50 * A Great Reorganzation of header files and executables 51 * 52 * Revision 1.3 2006/02/22 19:37:51 arthchan2003 53 * Removed command-line remove_zero_var_gau. See the comments in revision 1.20 of cont_mgau.c 54 * 55 * Revision 1.2 2006/02/22 18:46:43 arthchan2003 56 * Merged from SPHINX3_5_2_RCI_IRII_BRANCH: Add a macro files that 57 * unified the command line of all the executables in Sphinx 3.6. 58 * Affected executable includes decode, decode_anytopo, livepretend, 59 * align, allphone, dag, astar and conf. This will be commmented 60 * individually in each executable. 61 * 62 * Revision 1.1.2.14 2006/01/16 19:50:19 arthchan2003 63 * 1, Changed -ltsoov to -lts_mismatch, 2, Added an option to unscale the hypothesis segment scores. , 3, Added an option to dump the best senone scores. 64 * 65 * Revision 1.1.2.13 2005/11/17 06:11:15 arthchan2003 66 * 1, Added -hypsegfmt which allows output of hyp(match)seg to s3, s2 and ctm segment format. 2, Added -outlatfmt, which allows conversion of sphinx 3 lattice to IBM lattice. 3, -latcompress, create an uncompressed(in terms of no. of links) version of dag. 67 * 68 * Revision 1.1.2.12 2005/10/07 18:55:10 arthchan2003 69 * Fixed the display problem. 70 * 71 * Revision 1.1.2.11 2005/09/26 02:32:34 arthchan2003 72 * (Change for comments) Also set agc default to none instead of max. The reason is that all 8 tests we have in the performance do not use -agc max. Also in practice, AGC usually hurt the performance. 73 * 74 * Revision 1.1.2.10 2005/09/26 02:21:57 arthchan2003 75 * Changed the option -s3hmmdir to -hmm. This seems to be more generic and cause fewer restraints in future. 76 * 77 * Revision 1.1.2.9 2005/09/25 19:04:23 arthchan2003 78 * Added macros for 1, tie routines which used vq_gen, 2, add support for using LTS rules to generate OOV. 3, enable and disable composite triphone support. 79 * 80 * Revision 1.1.2.8 2005/09/18 01:14:58 arthchan2003 81 * Tie Viterbi history, DAG, debugging command line together. Inspect all possible commands and specify whether they are mode-specific. 82 * 83 * Revision 1.1.2.7 2005/09/07 23:27:21 arthchan2003 84 * Added an option in gmm_command_line_macro() to allow multiple behavior of Gaussian flooring. 85 * 86 * Revision 1.1.2.6 2005/08/03 19:58:11 arthchan2003 87 * Change -topn from fast_GMM macro to acoustic model command line 88 * 89 * Revision 1.1.2.5 2005/08/03 18:53:59 dhdfu 90 * Add -topn for SCHMM models 91 * 92 * Revision 1.1.2.4 2005/08/02 21:08:32 arthchan2003 93 * 1, Changed -mean, -var, -tmat, -mixw -mdef to make them not required arguments. 2, Added -s3hmmdir so that user can just specified a directory name, in which all components of a set of HMM could be found. 94 * 95 * Revision 1.1.2.3 2005/07/24 01:43:59 arthchan2003 96 * Temporarily not support -fsgctlfn 97 * 98 * Revision 1.1.2.2 2005/07/20 19:43:44 arthchan2003 99 * Add command line arguments for fsg routines. 100 * 101 * Revision 1.1.2.1 2005/07/18 18:56:20 arthchan2003 102 * A centralized macro definition file that contains command-line information that shared by different applications. 103 * 104 * 105 * 106 */ 107 108 #ifndef _CMDLN_MACRO_H_ 109 #define _CMDLN_MACRO_H_ 110 111 /* Note by ARCHAN at 20050717 112 113 The following are macros that used by individual modules and 114 routines. Since we want in one application, there is only one 115 command-line arguments. (The concept of singleton in Pattern). If 116 we used variables, then every application that call this file and 117 its implementation will need got every command-line from every 118 application. That is not very nice. 119 120 Using macro will temporarily solve this problem and I hope this 121 will only last for less than one minor version time. A better way, 122 as what we have already done in Sphinx 4, is to ask the libraries 123 to register its command-line argument as well as configuration 124 arguments. This will give user a better time of configuration and 125 us a better architecture. 126 127 */ 128 129 #define vq_cluster_command_line_macro() \ 130 { "-stdev", \ 131 ARG_BOOLEAN, \ 132 "no", \ 133 "Use std.dev. (rather than var) in computing vector distances during clustering" }, \ 134 { "-eps", \ 135 ARG_FLOAT64, \ 136 "0.0001", \ 137 "Stopping criterion: stop iterations if relative decrease in sq(error) < eps" }, \ 138 { "-iter", \ 139 ARG_INT32, \ 140 "100", \ 141 "Max no. of k-means iterations for clustering" } 142 143 #define gmm_command_line_macro() \ 144 { "-mean",\ 145 ARG_STRING,\ 146 NULL,\ 147 "Mixture gaussian means input file" },\ 148 { "-var",\ 149 ARG_STRING,\ 150 NULL,\ 151 "Mixture gaussian variances input file" },\ 152 { "-varfloor",\ 153 ARG_FLOAT32,\ 154 "0.0001",\ 155 "Mixture gaussian variance floor (applied to data from -var file)" },\ 156 { "-mixw",\ 157 ARG_STRING,\ 158 NULL,\ 159 "Senone mixture weights input file" },\ 160 { "-mixwfloor",\ 161 ARG_FLOAT32,\ 162 "0.0000001",\ 163 "Senone mixture weights floor (applied to data from -mixw file)" } 164 165 #define acoustic_model_command_line_macro() \ 166 gmm_command_line_macro(), \ 167 { "-hmm", \ 168 ARG_STRING, \ 169 NULL, \ 170 "Directory for specifying Sphinx 3's hmm, the following files are assummed to be present, mdef, mean, var, mixw, tmat. If -mdef, -mean, -var, -mixw or -tmat are specified, they will override this command. "}, \ 171 { "-featparams", \ 172 ARG_STRING, \ 173 NULL, \ 174 "File containing feature extraction parameters."}, \ 175 { "-mdef", \ 176 ARG_STRING,\ 177 NULL,\ 178 "Model definition input file" },\ 179 { "-tmat",\ 180 ARG_STRING,\ 181 NULL,\ 182 "HMM state transition matrix input file" },\ 183 { "-tmatfloor",\ 184 ARG_FLOAT32,\ 185 "0.0001",\ 186 "HMM state transition probability floor (applied to -tmat file)" },\ 187 { "-senmgau",\ 188 ARG_STRING,\ 189 ".cont.",\ 190 "Senone to mixture-gaussian mapping file (or .semi. or .cont.)" }, \ 191 { "-topn", \ 192 ARG_INT32, \ 193 "4", \ 194 "(S3.0 GMM Computation only) No. of top scoring densities computed in each mixture gaussian codebook (semi-continuous models only)" } 195 196 #define language_model_command_line_macro() \ 197 { "-lm", \ 198 ARG_STRING, \ 199 NULL, \ 200 "Word trigram language model input file" }, \ 201 { "-lmctlfn", \ 202 ARG_STRING, \ 203 NULL, \ 204 "Specify a set of language model\n"}, \ 205 { "-lmdumpdir", \ 206 ARG_STRING, \ 207 NULL, \ 208 "The directory for dumping the DMP file. "}, \ 209 { "-lmname", \ 210 ARG_STRING, \ 211 NULL, \ 212 "Name of language model in -lmctlfn to use for all utterances" } 213 214 #if 0 215 /* Comment out because I don't know what is the meaning of Sphinx 2 fsg control file means. */ 216 { "-fsgctlfn", 217 ARG_STRING, 218 NULL, 219 "A finite state grammar control file" }, 220 #endif 221 222 #define finite_state_grammar_command_line_macro() \ 223 { "-fsg", \ 224 ARG_STRING, \ 225 NULL, \ 226 "(FSG Mode (Mode 2) only) Finite state grammar"}, \ 227 { "-fsgusealtpron", \ 228 ARG_BOOLEAN, \ 229 "yes", \ 230 "(FSG Mode (Mode 2) only) Use alternative pronunciations for FSG"}, \ 231 { "-fsgusefiller", \ 232 ARG_BOOLEAN, \ 233 "yes", \ 234 "(FSG Mode (Mode 2) only) Insert filler words at each state."} 235 236 237 #define log_table_command_line_macro() \ 238 { "-logbase", \ 239 ARG_FLOAT32, \ 240 "1.0003", \ 241 "Base in which all log-likelihoods calculated" }, \ 242 { "-log3table", \ 243 ARG_BOOLEAN, \ 244 "yes", \ 245 "Determines whether to use the logs3 table or to compute the values at run time."} 246 247 #define phoneme_lookahead_command_line_macro() \ 248 { "-pheurtype", \ 249 ARG_INT32, \ 250 "0", \ 251 "0 = bypass, 1= sum of max, 2 = sum of avg, 3 = sum of 1st senones only" }, \ 252 { "-pl_window", \ 253 ARG_INT32, \ 254 "1", \ 255 "Window size (actually window size-1) of phoneme look-ahead." }, \ 256 { "-pl_beam", \ 257 ARG_FLOAT64, \ 258 "1.0e-80", \ 259 "Beam for phoneme look-ahead. [1 (narrowest)..10000000(very wide)]" } 260 261 #define histogram_pruning_command_line_macro() \ 262 { "-maxwpf", \ 263 ARG_INT32, \ 264 "20", \ 265 "(Only used in Mode 4 and 5) Max no. of distinct word exits to maintain at each frame" }, \ 266 { "-maxhistpf", \ 267 ARG_INT32, \ 268 "100", \ 269 "(Only used in Mode 4 and 5) Max no. of histories to maintain at each frame" }, \ 270 { "-hmmhistbinsize", \ 271 ARG_INT32, \ 272 "5000", \ 273 "(Only used in Mode 4 and 5) Performance histogram: #frames vs #HMMs active; #HMMs/bin in this histogram" }, \ 274 { "-maxhmmpf", \ 275 ARG_INT32, \ 276 "20000", \ 277 "(Only used in Mode 4 and 5) Max no. of active HMMs to maintain at each frame; approx." } 278 279 #define dictionary_command_line_macro() \ 280 { "-dict", \ 281 ARG_STRING, \ 282 NULL, \ 283 "Main pronunciation dictionary (lexicon) input file" }, \ 284 { "-fdict", \ 285 ARG_STRING, \ 286 NULL, \ 287 "Silence and filler (noise) word pronunciation dictionary input file" }, \ 288 { "-lts_mismatch", \ 289 ARG_BOOLEAN, \ 290 "no", \ 291 "Use CMUDict letter-to-sound rules to generate pronunciations for LM words doesn't appear in the dictionary . Use it with care. It assumes that the phone set in the mdef and dict are the same as the LTS rule. "} 292 293 #define gaussian_selection_command_line_macro() \ 294 { "-gs", \ 295 ARG_STRING, \ 296 NULL, \ 297 "Gaussian Selection Mapping." } 298 299 #define fast_GMM_computation_command_line_macro() \ 300 { "-subvq", \ 301 ARG_STRING, \ 302 NULL, \ 303 "Sub-vector quantized form of acoustic model" }, \ 304 { "-subvqbeam", \ 305 ARG_FLOAT64, \ 306 "3.0e-3", \ 307 "Beam selecting best components within each mixture Gaussian [0(widest)..1(narrowest)]" }, \ 308 gaussian_selection_command_line_macro(), \ 309 { "-ds", \ 310 ARG_INT32, \ 311 "1", \ 312 "Ratio of Down-sampling the frame computation." }, \ 313 { "-cond_ds", \ 314 ARG_BOOLEAN, \ 315 "no", \ 316 "Conditional Down-sampling, override normal down sampling. require specify a gaussian selection map" }, \ 317 { "-dist_ds", \ 318 ARG_BOOLEAN, \ 319 "no", \ 320 "Distance-based Down-sampling, override normal down sampling." }, \ 321 { "-gs4gs", \ 322 ARG_BOOLEAN, \ 323 "yes", \ 324 "A flag that specified whether the input GS map will be used for Gaussian Selection. If it is disabled, the map will only provide information to other modules." }, \ 325 { "-svq4svq", \ 326 ARG_BOOLEAN, \ 327 "no", \ 328 "A flag that specified whether the input SVQ will be used as approximate scores of the Gaussians" }, \ 329 { "-ci_pbeam", \ 330 ARG_FLOAT64, \ 331 "1e-80", /*default is huge , so nearly every cd phone will be computed */ \ 332 "CI phone beam for CI-based GMM Selection. [0(widest) .. 1(narrowest)]"}, \ 333 { "-tighten_factor", /* Use in "Down-sampling", this will tightened the beam \ 334 */ \ 335 ARG_FLOAT64, \ 336 "0.5", \ 337 "From 0 to 1, it tightens the beam width when the frame is dropped"}, \ 338 { "-maxcdsenpf", \ 339 ARG_INT32, \ 340 "100000", \ 341 "Max no. of distinct CD senone will be computed. " }, \ 342 { "-vqeval", \ 343 ARG_INT32, \ 344 "3", \ 345 "Number of subvectors to use for SubVQ-based frame evaluation (3 for all)"}, \ 346 { "-kdtree",\ 347 ARG_STRING,\ 348 NULL,\ 349 "kd-Tree file for Gaussian selection (for .s2semi models only)" }, \ 350 { "-kdmaxdepth",\ 351 ARG_INT32,\ 352 "0",\ 353 "Maximum depth of kd-Trees to use" }, \ 354 { "-kdmaxbbi",\ 355 ARG_INT32,\ 356 "-1",\ 357 "Maximum number of Gaussians per leaf node in kd-Trees" } 358 359 #if 0 360 { "-feat", 361 ARG_STRING, 362 "s2_4x", 363 "Feature stream:\n\t\t\t\ts2_4x: Sphinx-II type 4 streams, 12cep, 24dcep, 3pow, 12ddcep\n\t\t\t\ts3_1x39: Single stream, 12cep+12dcep+3pow+12ddcep\n\t\t\t\t1s_12c_12d_3p_12dd: Single stream, 12cep+12dcep+3pow+12ddcep\n\t\t\t\t1s_c: Single stream, given input vector only\n\t\t\t\t1s_c_d: Feature + Deltas only\n\t\t\t\t1s_c_dd: Feature + Double deltas only\n\t\t\t\t1s_c_d_dd: Feature + Deltas + Double deltas\n\t\t\t\t1s_c_wd_dd: Feature cep+windowed delcep+deldel \n\t\t\t1s_c_d_ld_dd: Feature + delta + longter delta + doubledelta" }, 364 365 { "-feat", /* Captures the computation for converting input to feature vector */ 366 ARG_STRING, 367 "1s_c_d_dd", 368 "Feature stream: s2_4x / s3_1x39 / cep_dcep[,%d] / cep[,%d] / %d,%d,...,%d" }, 369 #endif 370 371 372 #define speaker_adaptation_command_line_macro() \ 373 { "-mllr", \ 374 ARG_STRING, \ 375 NULL, \ 376 "MLLR transfomation matrix to be applied to mixture gaussian means"}, \ 377 { "-cb2mllr", \ 378 ARG_STRING, \ 379 ".1cls.", \ 380 "Senone to MLLR transformation matrix mapping file (or .1cls.)" } 381 382 383 #define common_filler_properties_command_line_macro() \ 384 { "-fillpen", \ 385 ARG_STRING, \ 386 NULL, \ 387 "Filler word probabilities input file (used in place of -silpen and -noisepen)" }, \ 388 { "-silprob", \ 389 ARG_FLOAT32, \ 390 "0.1", \ 391 "Default silence word probability" }, \ 392 { "-fillprob", \ 393 ARG_FLOAT32, \ 394 "0.1", \ 395 "Default non-silence filler word probability" }, \ 396 { "-lw", \ 397 ARG_FLOAT32, \ 398 "9.5", \ 399 "Language weight" }, \ 400 { "-wip", \ 401 ARG_FLOAT32, \ 402 "0.7", \ 403 "Word insertion penalty" }, \ 404 { "-uw", \ 405 ARG_FLOAT32, \ 406 "0.7", \ 407 "Unigram weight" } 408 409 /* Follow sphinx 3.0, this should be implemented in nearly 410 every tool */ 411 #define phone_insertion_penalty_command_line_macro() \ 412 { "-phonepen", \ 413 ARG_FLOAT32, \ 414 "1.0", \ 415 "(Mode 2 and 3 only) Word insertion penalty" } 416 417 418 #define common_s3x_beam_properties_command_line_macro() \ 419 { "-beam", \ 420 ARG_FLOAT64, \ 421 "1.0e-55", \ 422 "Beam selecting active HMMs (relative to best) in each frame [0(widest)..1(narrowest)]" }, \ 423 { "-pbeam", \ 424 ARG_FLOAT64, \ 425 "1.0e-50", \ 426 "Beam selecting HMMs transitioning to successors in each frame [0(widest)..1(narrowest)]" }, \ 427 { "-wbeam", \ 428 ARG_FLOAT64, \ 429 "1.0e-35", \ 430 "Beam selecting word-final HMMs exiting in each frame [0(widest)..1(narrowest)]" }, \ 431 { "-wend_beam", \ 432 ARG_FLOAT64, \ 433 "1.0e-80", \ 434 "Beam selecting word-final HMMs exiting in each frame [0(widest) .. 1(narrowest)]" }, \ 435 { "-ptranskip", \ 436 ARG_INT32, \ 437 "0", \ 438 "(Not used in Mode 3) Use wbeam for phone transitions every so many frames (if >= 1)" } 439 440 #define common_application_properties_command_line_macro() \ 441 { "-logfn", \ 442 ARG_STRING, \ 443 NULL, \ 444 "Log file (default stdout/stderr)" } 445 446 #define control_file_handling_command_line_macro() \ 447 { "-ctl", \ 448 ARG_STRING, \ 449 NULL, \ 450 "Control file listing utterances to be processed" }, \ 451 { "-ctloffset", \ 452 ARG_INT32, \ 453 "0", \ 454 "No. of utterances at the beginning of -ctl file to be skipped" }, \ 455 { "-ctlcount", \ 456 ARG_INT32, \ 457 "1000000000", /* A big number to approximate the default: "until EOF" */ \ 458 "No. of utterances to be processed (after skipping -ctloffset entries)" } 459 460 #define hypothesis_file_handling_command_line_macro() \ 461 { "-hyp", \ 462 ARG_STRING, \ 463 NULL, \ 464 "Recognition result file, with only words" }, \ 465 { "-hypseg", \ 466 ARG_STRING, \ 467 NULL, \ 468 "Recognition result file, with word segmentations and scores" } 469 470 #define score_handling_command_line_macro() \ 471 { "-hypsegscore_unscale", \ 472 ARG_BOOLEAN, \ 473 "yes", \ 474 "When displaying the results, whether to unscale back the acoustic score with the best score in a frame"} 475 476 #define cepstral_input_handling_command_line_macro() \ 477 { "-cepdir", \ 478 ARG_STRING, \ 479 NULL, \ 480 "Input cepstrum files directory (prefixed to filespecs in control file)" }, \ 481 { "-cepext", \ 482 ARG_STRING, \ 483 ".mfc", \ 484 "Input cepstrum files extension (prefixed to filespecs in control file)" }, \ 485 { "-adcin", \ 486 ARG_BOOLEAN, \ 487 "no", \ 488 "Input is waveform data rather than cepstra (-cepdir and -cepext are still used)" }, \ 489 { "-adchdr", \ 490 ARG_INT32, \ 491 "0", \ 492 "Number of bytes to skip at the beginning of a waveform file (44 for WAV, 1024 for Sphere)" } 493 494 #define output_lattice_handling_command_line_macro() \ 495 { "-outlatdir", \ 496 ARG_STRING, \ 497 NULL, \ 498 "Directory in which to dump word lattices" }, \ 499 { "-outlatfmt", \ 500 ARG_STRING, \ 501 "s3", \ 502 "Format in which to dump word lattices (either 's3' or 'htk')" }, \ 503 { "-latext", \ 504 ARG_STRING, \ 505 "lat.gz", \ 506 "Filename extension for lattice files (gzip compressed, by default - remove .gz for uncompressed)" } 507 508 509 510 #define history_table_command_line_macro() \ 511 { "-bptbldir", \ 512 ARG_STRING, \ 513 NULL, \ 514 "Directory in which to dump word Viterbi back pointer table (for debugging)" }, \ 515 { "-bptblsize", \ 516 ARG_INT32, \ 517 "32768", \ 518 "Number of BPtable entries to allocate initially (grown as necessary)" } 519 520 /* decode-specific, that includes mode 4 and mode 5' 521 share between decode/livepretend/livedecode 522 */ 523 #define decode_specific_command_line_macro() \ 524 { "-mode", \ 525 ARG_STRING, \ 526 "fwdtree",\ 527 "Decoding mode, one of allphone, fsg, fwdflat, fwdtree."}, \ 528 { "-op_mode", \ 529 ARG_INT32, \ 530 "-1", \ 531 "Operation mode, for internal use only."}, \ 532 { "-hmmdump", \ 533 ARG_BOOLEAN, \ 534 "no", \ 535 "Whether to dump active HMM details to stderr (for debugging)" }, \ 536 { "-lextreedump", \ 537 ARG_INT32, \ 538 "0", \ 539 "Whether to dump the lextree structure to stderr (for debugging), 1 for Ravi's format, 2 for Dot format, Larger than 2 will be treated as Ravi's format" }, \ 540 { "-bghist", \ 541 ARG_BOOLEAN, \ 542 "no", \ 543 "Bigram-mode: If TRUE only one BP entry/frame; else one per LM state" }, \ 544 { "-treeugprob", \ 545 ARG_BOOLEAN, \ 546 "yes", \ 547 "If true, Use unigram probs in lextree" } 548 549 #define dag_handling_command_line_macro() \ 550 { "-min_endfr", \ 551 ARG_INT32, \ 552 "3", \ 553 "Nodes ignored during search if they persist for fewer than so many end frames" }, \ 554 { "-dagfudge", \ 555 ARG_INT32, \ 556 "2", \ 557 "(0..2); 1 or 2: add edge if endframe == startframe; 2: if start == end-1" }, \ 558 { "-maxedge", \ 559 ARG_INT32, \ 560 "2000000", \ 561 "Max DAG edges allowed in utterance; aborted if exceeded; controls memory usage" }, \ 562 { "-maxlmop", \ 563 ARG_INT32, \ 564 "100000000", \ 565 "Max LMops in utterance after which it is aborted; controls CPU use (see maxlpf)" }, \ 566 { "-maxlpf", \ 567 ARG_INT32, \ 568 "40000", \ 569 "Max LMops/frame after which utterance aborted; controls CPU use (see maxlmop)" }, \ 570 {"-latcompress", \ 571 ARG_BOOLEAN, \ 572 "yes", \ 573 "Whether lattice is compressed."} 574 575 576 #define second_stage_dag_handling_command_line_macro() \ 577 { "-bestpath", \ 578 ARG_BOOLEAN, \ 579 "no", \ 580 "Whether to run bestpath DAG search after forward Viterbi pass" }, \ 581 { "-bestpathlw", \ 582 ARG_FLOAT32, \ 583 NULL, \ 584 "Language weight for bestpath DAG search (default: same as -lw)" }, \ 585 {"-nbestdir", \ 586 ARG_STRING, \ 587 NULL, \ 588 "Input word-lattice directory with per-utt files for restricting words searched"}, \ 589 {"-nbestext", \ 590 ARG_STRING, \ 591 "nbest.gz", \ 592 "N-best filename extension (.gz or .Z extension for compression)"}, \ 593 {"-nbest", \ 594 ARG_INT32, \ 595 "200", \ 596 "Max. n-best hypotheses to generate per utterance"}, \ 597 {"-maxppath", \ 598 ARG_INT32, \ 599 "1000000", \ 600 "Max partial paths created after which utterance aborted; controls CPU/memory use"}, \ 601 {"-ppathdebug", \ 602 ARG_BOOLEAN, \ 603 "no", \ 604 "Generate debugging information for N-best search. "} 605 606 #define input_lattice_handling_command_line_macro() \ 607 { "-inlatdir", \ 608 ARG_STRING, \ 609 NULL, \ 610 "Input word-lattice directory with per-utt files for restricting words searched" }, \ 611 { "-inlatwin", \ 612 ARG_INT32, \ 613 "50", \ 614 "Input word-lattice words starting within +/- <this argument> of current frame considered during search" } 615 616 #define flat_fwd_debugging_command_line_macro() \ 617 { "-tracewhmm", \ 618 ARG_STRING, \ 619 NULL, \ 620 "(Mode 3 only) Word whose active HMMs are to be traced (for debugging/diagnosis/analysis)" }, \ 621 { "-hmmdumpef", \ 622 ARG_INT32, \ 623 "200000000", \ 624 "(Mode 3 only) Ending frame for dumping all active HMMs (for debugging/diagnosis/analysis)" }, \ 625 { "-hmmdumpsf", \ 626 ARG_INT32, \ 627 "200000000", \ 628 "(Mode 3 only) Starting frame for dumping all active HMMs (for debugging/diagnosis/analysis)" }, \ 629 { "-worddumpef", \ 630 ARG_INT32, \ 631 "200000000", \ 632 "(Mode 3 only) Ending frame for dumping all active words (for debugging/diagnosis/analysis)" }, \ 633 { "-worddumpsf", \ 634 ARG_INT32, \ 635 "200000000", \ 636 "(Mode 3 only) Starting frame for dumping all active words (for debugging/diagnosis/analysis)" } 637 638 639 #define search_specific_command_line_macro() \ 640 {"-backtrace", \ 641 ARG_BOOLEAN, \ 642 "yes", \ 643 "Whether detailed backtrace information (word segmentation/scores) shown in log" }, \ 644 { "-bestsenscrdir", \ 645 ARG_STRING, \ 646 NULL, \ 647 "When Best senone score directory." } 648 649 650 /* mode TST or mode 4*/ 651 #define search_modeTST_specific_command_line_macro() \ 652 { "-Nlextree", \ 653 ARG_INT32, \ 654 "3", \ 655 "(Mode 4 only) No. of lextrees to be instantiated; entries into them staggered in time" }, \ 656 { "-epl", \ 657 ARG_INT32, \ 658 "3", \ 659 "(Mode 4 only) Entries Per Lextree; #successive entries into one lextree before lextree-entries shifted to the next" } 660 661 /* mode WST or mode 5*/ 662 #define search_modeWST_specific_command_line_macro() \ 663 { "-Nstalextree", \ 664 ARG_INT32, \ 665 "25", \ 666 "(Mode 5 only) No. of lextrees to be instantiated statically; " } 667 668 #define partial_hypothesis_command_line_macro() \ 669 { "-maxhyplen", \ 670 ARG_INT32, \ 671 "1000", \ 672 "(Live-decoder only) Maximum number of words in a partial hypothesis (for block decoding)" }, \ 673 { "-phypdump", \ 674 ARG_BOOLEAN, \ 675 "yes", \ 676 "(Live-decoder only) dump parital hypothesis on the screen"} 677 678 #define control_lm_file_command_line_macro() \ 679 { "-ctl_lm", \ 680 ARG_STRING, \ 681 NULL, \ 682 "(Not used in mode 2 and 3) Control file that list the corresponding LMs" } 683 684 #define control_mllr_file_command_line_macro() \ 685 { "-ctl_mllr", \ 686 ARG_STRING, \ 687 NULL, \ 688 "Control file that list the corresponding MLLR matrix for an utterance"} 689 690 #define control_lm_mllr_file_command_line_macro() \ 691 control_lm_file_command_line_macro(), \ 692 control_mllr_file_command_line_macro() 693 694 #endif /* _CMDLN_MACRO_H_ */ 695