⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmdln_macro.h

📁 WinCE平台上的语音识别程序
💻 H
📖 第 1 页 / 共 2 页
字号:
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- *//* ==================================================================== * Copyright (c) 2006 Carnegie Mellon University.  All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer.  * * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in *    the documentation and/or other materials provided with the *    distribution. * * This work was supported in part by funding from the Defense Advanced  * Research Projects Agency and the National Science Foundation of the  * United States of America, and the CMU Sphinx Speech Consortium. * * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ==================================================================== * *//* cmdln_macro.h - Command line definitions for PocketSphinx */#ifndef __PS_CMDLN_MACRO_H__#define __PS_CMDLN_MACRO_H__#include <cmd_ln.h>#include <fe.h> /* For waveform_to_cepstral_command_line_macro() *//** Options defining speech data input */#define input_cmdln_options()								\{ "-live",										\      ARG_BOOLEAN,									\      "no",										\      "Get input from audio hardware" },						\{ "-ctl",										\      ARG_STRING,									\      NULL,										\      "Control file listing utterances to be processed" },				\{ "-ctloffset",										\      ARG_INT32,									\      "0",										\      "No. of utterances at the beginning of -ctl file to be skipped" },		\{ "-ctlcount",										\      ARG_INT32,									\      "1000000000",	/* A big number to approximate the default: "until EOF" */	\      "No. of utterances to be processed (after skipping -ctloffset entries)" },	\{ "-ctlincr",										\      ARG_INT32,									\      "1",										\      "Do every Nth line in the control file" },					\{ "-adcin",										\      ARG_BOOLEAN,									\      "no",										\      "Input is raw audio data" },							\{ "-adcendian",										\      ARG_STRING,									\      "little",										\      "Byte order for raw audio files (little/big)" },					\{ "-adchdr",										\      ARG_INT32,									\      "0",										\      "Size of audio file header in bytes (headers are ignored)" },			\{ "-cepdir",										\      ARG_STRING,									\      NULL,										\      "Input files directory (prefixed to filespecs in control file)" },		\{ "-cepext",										\      ARG_STRING,									\      ".mfc",										\      "Input files extension (prefixed to filespecs in control file)" },		\{ "-rawlogdir",										\      ARG_STRING,									\      NULL,										\      "Directory for dumping raw audio input files" },					\{ "-mfclogdir",										\      ARG_STRING,									\      NULL,										\      "Directory for dumping feature input files" },					\{ "-cmn",										\      ARG_STRING,									\      "current",									\      "Cepstral mean normalization scheme ('current', 'prior', or 'none')" },		\{ "-varnorm",										\      ARG_BOOLEAN,									\      "no",										\      "Variance normalize each utterance (only if CMN == current)" },			\{ "-agc",										\      ARG_STRING,									\      "none",										\      "Automatic gain control for c0 ('max', 'emax', 'noise', or 'none')" },		\{ "-agcthresh",										\      ARG_FLOAT32,									\      "2.0",										\      "Initial threshold for automatic gain control" }/** Options defining recognition data output and logging */#define output_cmdln_options()							\{ "-logfn",									\      ARG_STRING,								\      NULL,									\      "Recognition log file name" },						\{ "-backtrace",									\      ARG_BOOLEAN,								\      "yes",									\      "Print back trace of recognition results" },				\{ "-shortbacktrace",								\      ARG_BOOLEAN,								\      "no",									\      "Print short back trace of recognition results" },			\{ "-phypdump",									\      ARG_BOOLEAN,								\      "no",									\      "Report partial results every so many frames" },				\{ "-phypsegdump",								\      ARG_BOOLEAN,								\      "no",									\      "Report detailed partial results every so many frames" },			\{ "-hyp",									\      ARG_STRING,								\      NULL,									\      "Recognition output file name" },						\{ "-hypseg",									\      ARG_STRING,								\      NULL,									\      "Recognition output with segmentation file name" },			\{ "-matchscore",								\      ARG_BOOLEAN,								\      "no",									\      "Report score in hyp file" },						\{ "-reportpron",								\      ARG_BOOLEAN,								\      "no",									\      "Report alternate pronunciations in match file" },			\{ "-nbestdir",									\      ARG_STRING,								\      NULL,									\      "Directory for writing N-best hypothesis lists" },			\{ "-nbestext",									\      ARG_STRING,								\      "hyp",									\      "Extension for N-best hypothesis list files" },				\{ "-nbest",									\      ARG_INT32,								\      "0",									\      "Number of N-best hypotheses to write to -nbestdir" },			\{ "-dumplatdir",								\      ARG_STRING,								\      NULL,									\      "Directory for dumping lattices" }/** Options defining beam width parameters for tuning the search. */#define beam_cmdln_options()									\{ "-beam",											\      ARG_FLOAT64,										\      "1e-48",											\      "Beam width applied to every frame in Viterbi search (smaller values mean wider beam)" },	\{ "-wbeam",											\      ARG_FLOAT64,										\      "1e-48",											\      "Beam width applied to word exits" },							\{ "-pbeam",											\      ARG_FLOAT64,										\      "1e-48",											\      "Beam width applied to phone transitions" },						\{ "-lpbeam",											\      ARG_FLOAT64,										\      "1e-40",											\      "Beam width applied to last phone in words" },						\{ "-lponlybeam",										\      ARG_FLOAT64,										\      "1e-28",											\      "Beam width applied to last phone in single-phone words" },				\{ "-fwdflatbeam",										\      ARG_FLOAT64,										\      "1e-64",											\      "Beam width applied to every frame in second-pass flat search" },				\{ "-fwdflatwbeam",										\      ARG_FLOAT64,										\      "1e-28",											\      "Beam width applied to word exits in second-pass flat search" }/** Options defining other parameters for tuning the search. */#define search_cmdln_options()                                                                  \{ "-compallsen",                                                                                \      ARG_BOOLEAN,                                                                              \      "no",                                                                                     \      "Compute all senone scores in every frame (can be faster when there are many senones)" }, \{ "-topsenfrm",                                                                                 \      ARG_INT32,                                                                                \      "1",                                                                                      \      "Number of frames' top senones to use in phoneme lookahead (needs -compallsen yes)" },    \{ "-topsenthresh",                                                                              \      ARG_INT32,                                                                                \      "-60000",                                                                                 \      "Threshold for top senones to use in phoneme lookahead" },                                \{ "-fwdtree",                                                                                   \      ARG_BOOLEAN,                                                                              \      "yes",                                                                                    \      "Run forward lexicon-tree search (1st pass)" },                                           \{ "-fwdflat",                                                                                   \      ARG_BOOLEAN,                                                                              \      "yes",                                                                                    \      "Run forward flat-lexicon search over word lattice (2nd pass)" },                         \{ "-bestpath",                                                                                  \      ARG_BOOLEAN,                                                                              \      "yes",                                                                                    \      "Run bestpath (Dijkstra) search over word lattice (3rd pass)" },                          \{ "-fwd3g",                                                                                     \      ARG_BOOLEAN,                                                                              \      "yes",                                                                                    \      "Use trigrams in first pass search" },                                                    \{ "-skipalt",                                                                                   \      ARG_BOOLEAN,                                                                              \      "no",                                                                                     \      "Skip alternate frames in exiting phones" },                                              \{ "-latsize",                                                                                   \      ARG_INT32,                                                                                \      "50000",                                                                                  \      "Lattice size" },                                                                         \{ "-maxwpf",                                                                                    \      ARG_INT32,                                                                                \      "100000",                                                                                 \      "Maximum number of distinct word exits to maintain at each frame (approx)" },             \{ "-maxhmmpf",                                                                                  \      ARG_INT32,                                                                                \      "100000",                                                                                 \      "Maximum number of active HMMs to maintain at each frame (approx)" },                     \{ "-maxhistpf",                                                                                 \      ARG_INT32,                                                                                \      "100",                                                                                    \      "Max no. of histories to maintain at each frame (UNUSED)" },                              \{ "-fwdflatefwid",                                                                              \      ARG_INT32,                                                                                \      "4",                                                                     	                \      "Minimum number of end frames for a word to be searched in fwdflat search" },             \{ "-fwdflatsfwin",                                                                              \      ARG_INT32,                                                                                \      "25",                                                                    	                \      "Window of frames in lattice to search for successor words in fwdflat search " },         \{ "-cachesen",                                                                                   \      ARG_BOOLEAN,                                                                              \      "no",                                                                                     \      "Cache senone scores from first pass search" },                                           \{ "-fsgbfs",                                                                                    \      ARG_BOOLEAN,                                                                              \      "yes",                                                                                    \      "Force backtrace from FSG final state"}/** Command-line options for finite state grammars. */#define fsg_cmdln_options()						\{ "-fsg",								\      ARG_STRING,							\      NULL,								\      "Finite state grammar"},						\{ "-fsgusealtpron",							\

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -