|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.util.props.ConfigurableAdapter
edu.cmu.sphinx.decoder.scorer.AbstractScorer
edu.cmu.sphinx.decoder.scorer.ThreadedAcousticScorer
public class ThreadedAcousticScorer
An acoustic scorer that breaks the scoring up into a configurable number of separate threads.
All scores are maintained in LogMath log base
| Field Summary | |
|---|---|
static java.lang.String |
PROP_IS_CPU_RELATIVE
A sphinx property name that controls whether the number of available CPUs on the system is used when determining the number of threads to use for scoring. |
static java.lang.String |
PROP_MIN_SCOREABLES_PER_THREAD
A Sphinx Property name that controls the minimum number of scoreables sent to a thread. |
static java.lang.String |
PROP_NUM_THREADS
A SphinxProperty name that controls the number of threads that are used to score hmm states. |
| Fields inherited from class edu.cmu.sphinx.decoder.scorer.AbstractScorer |
|---|
FEATURE_FRONTEND, SCORE_NORMALIZER |
| Constructor Summary | |
|---|---|
ThreadedAcousticScorer()
|
|
ThreadedAcousticScorer(BaseDataProcessor frontEnd,
ScoreNormalizer scoreNormalizer,
int minScoreablesPerThread,
boolean cpuRelative,
int numThreads)
|
|
| Method Summary | |
|---|---|
void |
deallocate()
Deallocates resources for this scorer |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
void |
startRecognition()
starts the scorer |
void |
stopRecognition()
stops the scorer |
| Methods inherited from class edu.cmu.sphinx.decoder.scorer.AbstractScorer |
|---|
allocate, calculateScores |
| Methods inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter |
|---|
getName, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@S4Integer(defaultValue=0) public static final java.lang.String PROP_NUM_THREADS
@S4Boolean(defaultValue=true) public static final java.lang.String PROP_IS_CPU_RELATIVE
@S4Integer(defaultValue=10) public static final java.lang.String PROP_MIN_SCOREABLES_PER_THREAD
| Constructor Detail |
|---|
public ThreadedAcousticScorer(BaseDataProcessor frontEnd,
ScoreNormalizer scoreNormalizer,
int minScoreablesPerThread,
boolean cpuRelative,
int numThreads)
frontEnd - the frontend to retrieve features from for scoringscoreNormalizer - optional post-processor for computed scores that will normalize scores. If not set, no normalization will
applied and the token scores will be returned unchanged.minScoreablesPerThread - the number of threads that are used to score hmm states. If the isCpuRelative
property is false, then is is the exact number of threads that are used to score hmm states. If the isCpuRelative
property is true, then this value is combined with the number of available proessors on the system. If you want
to have one thread per CPU available to score states, set the NUM_THREADS property to 0 and the isCpuRelative to
true. If you want exactly one thread to process scores set NUM_THREADS to 1 and isCpuRelative to false.
If the value is 1 isCpuRelative is false no additional thread will be instantiated, and all compuation will be
done in the calling thread itself. The default value is 0.cpuRelative - controls whether the number of available CPUs on the system is used when determining
the number of threads to use for scoring. If true, the NUM_THREADS property is combined with the available number
of CPUS to deterimine the number of threads. Note that the number of threads is contrained to be never lower than
zero. Also, if the number of threads is 0, the states are scored on the calling thread, no separate threads are
started. The default value is false.numThreads - the minimum number of scoreables sent to a thread. This is used to prevent
over threading of the scoring that could happen if the number of threads is high compared to the size of the
activelist. The default is 50public ThreadedAcousticScorer()
| Method Detail |
|---|
public void newProperties(PropertySheet ps)
throws PropertyException
Configurable
newProperties in interface ConfigurablenewProperties in class AbstractScorerps - a property sheet holding the new data
PropertyException - if there is a problem with the properties.public void startRecognition()
AcousticScorer
startRecognition in interface AcousticScorerstartRecognition in class AbstractScorerpublic void stopRecognition()
AcousticScorer
stopRecognition in interface AcousticScorerstopRecognition in class AbstractScorerpublic void deallocate()
AcousticScorer
deallocate in interface AcousticScorerdeallocate in class AbstractScorer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||