edu.cmu.sphinx.decoder
Class FrameDecoder

java.lang.Object
  extended by edu.cmu.sphinx.decoder.AbstractDecoder
      extended by edu.cmu.sphinx.decoder.FrameDecoder
All Implemented Interfaces:
ResultProducer, DataProcessor, Configurable

public class FrameDecoder
extends AbstractDecoder
implements DataProcessor

A decoder which does not use the common pull-principle of S4 but processes only one single frame on each call of decode(). When using this decoder, make sure that the AcousticScorer used by the SearchManager can access some buffered Datas.


Field Summary
 
Fields inherited from class edu.cmu.sphinx.decoder.AbstractDecoder
AUTO_ALLOCATE, FIRE_NON_FINAL_RESULTS, PROP_RESULT_LISTENERS, PROP_SEARCH_MANAGER
 
Constructor Summary
FrameDecoder()
           
 
Method Summary
 Result decode(java.lang.String referenceText)
          Decode a single frame.
 Data getData()
          Returns the processed Data output.
 DataProcessor getPredecessor()
          Returns the predecessor DataProcessor.
 void initialize()
          Initializes this DataProcessor.
 void setPredecessor(DataProcessor predecessor)
          Sets the predecessor DataProcessor.
 
Methods inherited from class edu.cmu.sphinx.decoder.AbstractDecoder
addResultListener, allocate, deallocate, newProperties, removeResultListener, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.sphinx.util.props.Configurable
newProperties
 

Constructor Detail

FrameDecoder

public FrameDecoder()
Method Detail

decode

public Result decode(java.lang.String referenceText)
Decode a single frame.

Specified by:
decode in class AbstractDecoder
Parameters:
referenceText - the reference text (or null)
Returns:
a result

getData

public Data getData()
             throws DataProcessingException
Description copied from interface: DataProcessor
Returns the processed Data output.

Specified by:
getData in interface DataProcessor
Returns:
an Data object that has been processed by this DataProcessor
Throws:
DataProcessingException - if a data processor error occurs

getPredecessor

public DataProcessor getPredecessor()
Description copied from interface: DataProcessor
Returns the predecessor DataProcessor.

Specified by:
getPredecessor in interface DataProcessor
Returns:
the predecessor

setPredecessor

public void setPredecessor(DataProcessor predecessor)
Description copied from interface: DataProcessor
Sets the predecessor DataProcessor. This method allows dynamic reconfiguration of the front end.

Specified by:
setPredecessor in interface DataProcessor
Parameters:
predecessor - the new predecessor of this DataProcessor

initialize

public void initialize()
Description copied from interface: DataProcessor
Initializes this DataProcessor. This is typically called after the DataProcessor has been configured.

Specified by:
initialize in interface DataProcessor