Scroll to navigation



pocketsphinx_batch - Run speech recognition in batch mode


pocketsphinx_batch -ctl ctlfile -cepdir cepdir -cepext .mfc [ options ]...


Run speech recognition over a list of utterances in batchmode. A list of arguments follows:

Size of audio file header in bytes (headers are ignored)
Input is raw audio data
Automatic gain control for c0 ('max', 'emax', 'noise', or 'none')
Initial threshold for automatic gain control
phoneme decoding with phonetic lm
Perform phoneme decoding with phonetic lm and context-independent units only
Preemphasis parameter
file giving extra arguments.
Inverse of acoustic model scale for confidence score calculation
Inverse weight applied to acoustic scores.
Print results and backtraces to log file.
Beam width applied to every frame in Viterbi search (smaller values mean wider beam)
Run bestpath (Dijkstra) search over word lattice (3rd pass)
Language model probability weight for bestpath search
Create missing subdirectories in output directory
files directory (prefixed to filespecs in control file)
Input files extension (suffixed to filespecs in control file)
Number of components in the input feature vector
Cepstral mean normalization scheme ('current', 'prior', or 'none')
Initial values (comma-separated) for cepstral mean when 'prior' is used
Compute all senone scores in every frame (can be faster when there are many senones)
file listing utterances to be processed
No. of utterances to be processed (after skipping -ctloffset entries)
Do every Nth line in the control file
No. of utterances at the beginning of -ctl file to be skipped
output in CTM file format (may require post-sorting)
level for debugging messages
pronunciation dictionary (lexicon) input file
Dictionary is case sensitive (NOTE: case insensitivity applies to ASCII characters only)
Add 1/2-bit noise
Use double bandwidth filters (same center freq)
Frame GMM computation downsampling ratio
word pronunciation dictionary input file
Feature stream type, depends on the acoustic model
containing feature extraction parameters.
Filler word transition probability
Frame rate
format finite state grammar file
file listing FSG file to use for each utterance
directory for FSG files
extension for FSG files (including leading dot)
Add alternate pronunciations to FSG
Insert filler words at each state.
Run forward flat-lexicon search over word lattice (2nd pass)
Beam width applied to every frame in second-pass flat search
Minimum number of end frames for a word to be searched in fwdflat search
Language model probability weight for flat lexicon (2nd pass) decoding
Window of frames in lattice to search for successor words in fwdflat search
Beam width applied to word exits in second-pass flat search
Run forward lexicon-tree search (1st pass)
containing acoustic model files.
output file name
output with segmentation file name
Endianness of input data, big or little, ignored if NIST or MS Wav
grammar file
to spot
file with keyphrases to spot, one per line
Delay to wait for best detection score
Phone loop probability for keyword spotting
Threshold for p(hyp)/p(alternatives) ratio
Initial backpointer table size
containing transformation matrix to be applied to features (single-stream features only)
Dimensionality of output of feature transformation (0 to use entire matrix)
Length of sin-curve for liftering, or 0 for no liftering.
trigram language model input file
a set of language model
language model in -lmctl to use by default
file listing LM name to use for each utterance
Base in which all log-likelihoods calculated
to write log messages in
Write out logspectral files instead of cepstra
Lower edge of filters
Beam width applied to last phone in words
Beam width applied to last phone in single-phone words
Language model probability weight
Maximum number of active HMMs to maintain at each frame (or -1 for no pruning)
Maximum number of distinct word exits at each frame (or -1 for no pruning)
definition input file
gaussian means input file
to log feature files to
Nodes ignored in lattice construction if they persist for fewer than N frames
mixture weights input file (uncompressed)
Senone mixture weights floor (applied to data from -mixw file)
transformation to apply to means and variances
file listing MLLR transforms to use for each utterance
directory for MLLR transforms
extension for MLLR transforms (including leading dot)
Use memory-mapped I/O (if possible) for model files
Number of N-best hypotheses to write to -nbestdir (0 for no N-best)
for writing N-best hypothesis lists
Extension for N-best hypothesis list files
Number of cep coefficients
Size of FFT
Number of filter banks
New word transition penalty
Minimum posterior probability for output lattice nodes
for dumping word lattices
Filename extension for dumping word lattices
Format for dumping word lattices (s3 or htk)
Beam width applied to phone transitions
Phone insertion penalty
Beam width applied to phone loop search for lookahead
Beam width applied to phone loop transitions for lookahead
Phone insertion penalty for phone loop
Weight for phoneme lookahead penalties
Phoneme lookahead window size, in frames
to log raw audio files to
Remove DC offset from each frame
Remove noise with spectral subtraction in mel-energies
Enables VAD, removes silence frames from processing
Round mel filter frequencies to DFT points
Sampling rate
Seed for random number generator; if less than zero, pick our own
dump (compressed mixture weights) input file
Input is senone score dump files
to log senone score files to
to codebook mapping input file (usually not needed)
Silence word transition probability
Write out cepstral-smoothed logspectral files
specification (e.g., 24,0-11/25,12-23/26-38 or 0-12/13-25/26-38)
state transition matrix input file
HMM state transition probability floor (applied to -tmat file)
Maximum number of top Gaussians to use in scoring.
Beam width used to determine top-N Gaussians (or a list, per-feature)
rule for JSGF (first public rule is default)
Which type of transform to use to calculate cepstra (legacy, dct, or htk)
Normalize mel filters to unit area
Upper edge of filters
Unigram weight
Num of silence frames to keep after from speech to silence.
Num of speech frames to keep before silence to speech.
Num of speech frames to trigger vad from silence to speech.
Threshold for decision between noise and silence frames. Log-ratio between signal level and noise level.
gaussian variances input file
Mixture gaussian variance floor (applied to data from -var file)
Variance normalize each utterance (only if CMN == current)
Show input filenames
defining the warping function
Warping function type (or shape)
Beam width applied to word exits
Word insertion penalty
Hamming window length

To do batchmode recognition, you will need to specify a control file, using -ctl This is a simple text file containing one entry per line. Each entry is the name of an input file relative to the -cepdir directory, and without the filename extension (which is given in the -cepext argument).

If you are using acoustic feature files as input (see sphinx_fe(1) for information on how to generate these), you can also specify a subpart of a file, using the following format:



Written by numerous people at CMU from 1994 onwards. This manual page by David Huggins-Daines <>


Copyright © 1994-2016 Carnegie Mellon University. See the file LICENSE included with this package for more information.


pocketsphinx_continuous(1), sphinx_fe(1).