|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.tools.batch.BatchModeRecognizer
edu.cmu.sphinx.tools.batch.BatchNISTRecognizer
public class BatchNISTRecognizer
Copyright 1999-2002 Carnegie Mellon University. Portions Copyright 2002 Sun Microsystems, Inc. Portions Copyright 2002 Mitsubishi Electric Research Laboratories. All Rights Reserved. Use is subject to license terms.
See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. User: Peter Wolf Date: Nov 10, 2005 Time: 2:42:06 PM Copyright 2005, Peter Wolf Runs a NIST corpus as used by the GALE project. The inputs are a CTL file, and a REF file. The output is a CTM file. A CTL file contains a list of utterances to decode. The format is
| Nested Class Summary | |
|---|---|
protected class |
BatchNISTRecognizer.CTLException
|
protected class |
BatchNISTRecognizer.CTLIterator
|
class |
BatchNISTRecognizer.CTLUtterance
|
| Field Summary | |
|---|---|
protected int |
bitsPerSample
|
protected int |
bytesPerFrame
|
protected int |
channelCount
|
protected java.lang.String |
ctlFile
|
protected java.lang.String |
ctmFile
|
protected java.lang.String |
dataDir
|
protected int |
framesPerSecond
|
static java.lang.String |
PROP_BITS_PER_SAMPLE
The sphinx properties that specify the format of the PCM audio in the data file |
static java.lang.String |
PROP_CHANNEL_COUNT
|
static java.lang.String |
PROP_CTL_FILE
The property that specifies the file containing the corpus utterance audio |
static java.lang.String |
PROP_CTM_FILE
The property that specifies the the directory where the output XXX files should be placed |
static java.lang.String |
PROP_DATA_DIR
The property that specifies the file containing the corpus utterance audio |
static java.lang.String |
PROP_FRAMES_PER_SECOND
|
static java.lang.String |
PROP_REF_FILE
The property that specifies the file containing the transcripts of the corpus |
static java.lang.String |
PROP_SAMPLES_PER_SECOND
|
protected java.lang.String |
refFile
|
protected int |
samplesPerSecond
|
| Fields inherited from class edu.cmu.sphinx.tools.batch.BatchModeRecognizer |
|---|
batchManager, cm, count, curBatchItem, inputDataProcessors, logger, name, PROP_COUNT, PROP_INPUT_DATA_PROCESSORS, PROP_RECOGNIZER, PROP_SKIP, PROP_TOTAL_BATCHES, PROP_USE_POOLED_BATCH_MANAGER, PROP_WHICH_BATCH, recognizer, skip, totalBatches, usePooledBatchManager, utteranceId, whichBatch |
| Constructor Summary | |
|---|---|
BatchNISTRecognizer()
|
|
BatchNISTRecognizer(Recognizer recognizer,
java.util.List<DataProcessor> inputDataProcessors,
java.lang.String ctlFile,
java.lang.String dataDir,
java.lang.String refFile,
java.lang.String ctmFile,
int bitsPerSample,
int samplesPerSecond,
int framesPerSecond,
int channelCount)
|
|
| Method Summary | |
|---|---|
void |
decode()
|
private int |
dumpBestPath(java.io.DataOutputStream out,
BatchNISTRecognizer.CTLUtterance utt,
Token token)
|
protected void |
handleResult(java.io.DataOutputStream out,
BatchNISTRecognizer.CTLUtterance utt,
Result result)
|
static byte[] |
hex2Binary(java.lang.String spelling)
|
private static int |
hexToByte(char c)
|
static void |
main(java.lang.String[] argv)
|
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
protected void |
setInputStream(BatchNISTRecognizer.CTLUtterance utt)
|
| Methods inherited from class edu.cmu.sphinx.tools.batch.BatchModeRecognizer |
|---|
addCommands, decode, recognize, setBatchFile, setInputStream, shell, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String ctlFile
protected java.lang.String dataDir
protected java.lang.String refFile
protected java.lang.String ctmFile
protected int bitsPerSample
protected int samplesPerSecond
protected int framesPerSecond
protected int channelCount
protected int bytesPerFrame
@S4String(defaultValue="") public static final java.lang.String PROP_DATA_DIR
@S4String(defaultValue="") public static final java.lang.String PROP_CTL_FILE
@S4String(defaultValue="") public static final java.lang.String PROP_REF_FILE
@S4String(defaultValue="") public static final java.lang.String PROP_CTM_FILE
@S4Integer(defaultValue=16) public static final java.lang.String PROP_BITS_PER_SAMPLE
@S4Integer(defaultValue=1) public static final java.lang.String PROP_CHANNEL_COUNT
@S4Integer(defaultValue=16000) public static final java.lang.String PROP_SAMPLES_PER_SECOND
@S4Integer(defaultValue=100) public static final java.lang.String PROP_FRAMES_PER_SECOND
| Constructor Detail |
|---|
public BatchNISTRecognizer(Recognizer recognizer,
java.util.List<DataProcessor> inputDataProcessors,
java.lang.String ctlFile,
java.lang.String dataDir,
java.lang.String refFile,
java.lang.String ctmFile,
int bitsPerSample,
int samplesPerSecond,
int framesPerSecond,
int channelCount)
public BatchNISTRecognizer()
| Method Detail |
|---|
public void newProperties(PropertySheet ps)
throws PropertyException
Configurable
newProperties in interface ConfigurablenewProperties in class BatchModeRecognizerps - a property sheet holding the new data
PropertyException - if there is a problem with the properties.
protected void setInputStream(BatchNISTRecognizer.CTLUtterance utt)
throws java.io.IOException
java.io.IOExceptionpublic void decode()
protected void handleResult(java.io.DataOutputStream out,
BatchNISTRecognizer.CTLUtterance utt,
Result result)
throws java.io.IOException
java.io.IOException
private int dumpBestPath(java.io.DataOutputStream out,
BatchNISTRecognizer.CTLUtterance utt,
Token token)
throws java.io.IOException
java.io.IOExceptionpublic static byte[] hex2Binary(java.lang.String spelling)
private static int hexToByte(char c)
public static void main(java.lang.String[] argv)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||