net.cscott.sdr.recog
Class SpeechInterrupter
java.lang.Object
edu.cmu.sphinx.util.props.ConfigurableAdapter
edu.cmu.sphinx.frontend.BaseDataProcessor
net.cscott.sdr.recog.SpeechInterrupter
- All Implemented Interfaces:
- DataProcessor, Configurable
public class SpeechInterrupter
- extends BaseDataProcessor
SpeechInterrupter
allows insertion of SpeechEndSignal
and
SpeechStartSignal
packets into an audio stream in order to force
the interruption of an on-going recognition. This allows the recognition
grammar to be switched asynchronously.
The SpeechInterrupter
also runs a thread to pull data eagerly
through the frontend; this ensures that interruption events occur at the
right point in the timeline, as well as helping upstream
LevelMonitor
s, etc, remain in real time (even if the recognizer is
running behind).
SpeechInterrupter
public SpeechInterrupter()
interrupt
public void interrupt()
- Insert speech start/end markers in the current data stream.
Thread-safe.
getData
public Data getData()
throws DataProcessingException
- Specified by:
getData
in interface DataProcessor
- Specified by:
getData
in class BaseDataProcessor
- Throws:
DataProcessingException
initialize
public void initialize()
- Specified by:
initialize
in interface DataProcessor
- Overrides:
initialize
in class BaseDataProcessor
Copyright © 2006-2009 C. Scott Ananian