edu.cmu.sphinx.research.parallel
Class ParallelSearchManager

java.lang.Object
  extended byedu.cmu.sphinx.research.parallel.ParallelSearchManager
All Implemented Interfaces:
Configurable, SearchManager

public class ParallelSearchManager
extends java.lang.Object
implements SearchManager

Performs recognition on parallel feature streams.


Field Summary
static java.lang.String PROP_ACTIVE_LIST_FACTORY
          The sphinx property name for the active list type.
static java.lang.String PROP_COMBINED_SCORE_PRUNER
          The sphinx property for the combined score pruner.
static java.lang.String PROP_DO_COMBINE_PRUNING
          The sphinx property name for whether to do combine pruning.
static boolean PROP_DO_COMBINE_PRUNING_DEFAULT
          The default value for whether to do combine pruning, which is false.
static java.lang.String PROP_DO_FEATURE_PRUNING
          The sphinx property name for whether to do feature pruning.
static boolean PROP_DO_FEATURE_PRUNING_DEFAULT
          The default value for whether to do feature pruning, which is false.
static java.lang.String PROP_FEATURE_SCORE_PRUNER
          The sphinx property for the feature score pruner.
static java.lang.String PROP_LINGUIST
          The sphinx property for linguist used.
static java.lang.String PROP_LOG_MATH
          The sphinx property for the log math used.
static java.lang.String PROP_SCORER
          The sphinx property for scorer used.
 
Constructor Summary
ParallelSearchManager()
           
 
Method Summary
 void allocate()
          Allocates the resources necessary for this search.
 void deallocate()
          Deallocates resources necessary for this search.
 java.lang.String getName()
          Retrieves the name for this configurable component
 void newProperties(PropertySheet ps)
          This method is called when this configurable component has new data.
 Result recognize(int nFrames)
          Performs recognition.
 void register(java.lang.String name, Registry registry)
          Register my properties.
 void startRecognition()
          Prepares the SearchManager for recognition.
 void stopRecognition()
          Performs post-recognition cleanup.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_ACTIVE_LIST_FACTORY

public static final java.lang.String PROP_ACTIVE_LIST_FACTORY
The sphinx property name for the active list type.

See Also:
Constant Field Values

PROP_DO_FEATURE_PRUNING

public static final java.lang.String PROP_DO_FEATURE_PRUNING
The sphinx property name for whether to do feature pruning.

See Also:
Constant Field Values

PROP_DO_FEATURE_PRUNING_DEFAULT

public static final boolean PROP_DO_FEATURE_PRUNING_DEFAULT
The default value for whether to do feature pruning, which is false.

See Also:
Constant Field Values

PROP_FEATURE_SCORE_PRUNER

public static final java.lang.String PROP_FEATURE_SCORE_PRUNER
The sphinx property for the feature score pruner.

See Also:
Constant Field Values

PROP_DO_COMBINE_PRUNING

public static final java.lang.String PROP_DO_COMBINE_PRUNING
The sphinx property name for whether to do combine pruning.

See Also:
Constant Field Values

PROP_DO_COMBINE_PRUNING_DEFAULT

public static final boolean PROP_DO_COMBINE_PRUNING_DEFAULT
The default value for whether to do combine pruning, which is false.

See Also:
Constant Field Values

PROP_COMBINED_SCORE_PRUNER

public static final java.lang.String PROP_COMBINED_SCORE_PRUNER
The sphinx property for the combined score pruner.

See Also:
Constant Field Values

PROP_SCORER

public static final java.lang.String PROP_SCORER
The sphinx property for scorer used.

See Also:
Constant Field Values

PROP_LINGUIST

public static final java.lang.String PROP_LINGUIST
The sphinx property for linguist used.

See Also:
Constant Field Values

PROP_LOG_MATH

public static final java.lang.String PROP_LOG_MATH
The sphinx property for the log math used.

See Also:
Constant Field Values
Constructor Detail

ParallelSearchManager

public ParallelSearchManager()
Method Detail

register

public void register(java.lang.String name,
                     Registry registry)
              throws PropertyException
Description copied from interface: Configurable
Register my properties. This method is called once early in the time of the component, shortly after the component is constructed. This component should register any configuration properties that it needs to register. If this configurable extends another configurable, super.register should also be called

Specified by:
register in interface Configurable
Parameters:
name - the name of the component
registry - the registry for this component
Throws:
PropertyException

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component has new data. The component should first validate the data. If it is bad the component should return false. If the data is good, the component should record the the data internally and return true.

Specified by:
newProperties in interface Configurable
Parameters:
ps - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.

allocate

public void allocate()
              throws java.io.IOException
Description copied from interface: SearchManager
Allocates the resources necessary for this search. This should be called once before an recognitions are performed

Specified by:
allocate in interface SearchManager
Throws:
java.io.IOException

getName

public java.lang.String getName()
Description copied from interface: Configurable
Retrieves the name for this configurable component

Specified by:
getName in interface Configurable
Returns:
the name

startRecognition

public void startRecognition()
Prepares the SearchManager for recognition. This method must be called before recognize is called.

Specified by:
startRecognition in interface SearchManager

recognize

public Result recognize(int nFrames)
Performs recognition. Processes no more than the given number of frames before returning. This method returns a partial result after nFrames have been processed, or a final result if recognition completes while processing frames. If a final result is returned, the actual number of frames processed can be retrieved from the result. This method may block while waiting for frames to arrive.

Specified by:
recognize in interface SearchManager
Parameters:
nFrames - the maximum number of frames to process. A final result may be returned before all nFrames are processed.
Returns:
the recognition result. The result may be a partial or a final result.

stopRecognition

public void stopRecognition()
Performs post-recognition cleanup. This method should be called after recognize returns a final result.

Specified by:
stopRecognition in interface SearchManager

deallocate

public void deallocate()
Description copied from interface: SearchManager
Deallocates resources necessary for this search. This should be called once after all recognitions are completed at the search manager is no longer needed.

Specified by:
deallocate in interface SearchManager