sdr 0.7

net.cscott.sdr.recog
Class SpeechInterrupter

java.lang.Object
  extended by edu.cmu.sphinx.util.props.ConfigurableAdapter
      extended by edu.cmu.sphinx.frontend.BaseDataProcessor
          extended by 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 LevelMonitors, etc, remain in real time (even if the recognizer is running behind).


Field Summary
 
Fields inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter
logger
 
Constructor Summary
SpeechInterrupter()
           
 
Method Summary
 Data getData()
           
 void initialize()
           
 void interrupt()
          Insert speech start/end markers in the current data stream.
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getPredecessor, getTimer, setPredecessor
 
Methods inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter
getName, initLogger, newProperties, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.sphinx.util.props.Configurable
newProperties
 

Constructor Detail

SpeechInterrupter

public SpeechInterrupter()
Method Detail

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

sdr 0.7

Copyright © 2006-2009 C. Scott Ananian