inpro.sphinx.frontend
Class ThreadingFrontendBuffer
java.lang.Object
edu.cmu.sphinx.util.props.ConfigurableAdapter
edu.cmu.sphinx.frontend.BaseDataProcessor
inpro.sphinx.frontend.ThreadingFrontendBuffer
- All Implemented Interfaces:
- edu.cmu.sphinx.frontend.DataProcessor, edu.cmu.sphinx.util.props.Configurable, java.lang.Runnable
public class ThreadingFrontendBuffer
- extends edu.cmu.sphinx.frontend.BaseDataProcessor
- implements java.lang.Runnable
A frontend processor that splits off (parts of) frontend processing into separate threads.
Put this processor as the last element of your frontend pipeline, in order to put the whole
frontend into its separate thread. Your mileage on performance improvements may vary.
- Author:
- timo
|
Field Summary |
(package private) java.lang.Thread |
drainer
|
(package private) java.util.concurrent.BlockingQueue<edu.cmu.sphinx.frontend.Data> |
queue
|
private static int |
queueCapacity
|
(package private) boolean |
running
|
| Fields inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter |
logger |
|
Method Summary |
edu.cmu.sphinx.frontend.Data |
getData()
|
void |
run()
|
private void |
start()
|
| Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor |
getPredecessor, getTimer, initialize, 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 |
queueCapacity
private static int queueCapacity
queue
java.util.concurrent.BlockingQueue<edu.cmu.sphinx.frontend.Data> queue
running
boolean running
drainer
java.lang.Thread drainer
ThreadingFrontendBuffer
public ThreadingFrontendBuffer()
getData
public edu.cmu.sphinx.frontend.Data getData()
throws edu.cmu.sphinx.frontend.DataProcessingException
- Specified by:
getData in interface edu.cmu.sphinx.frontend.DataProcessor- Specified by:
getData in class edu.cmu.sphinx.frontend.BaseDataProcessor
- Throws:
edu.cmu.sphinx.frontend.DataProcessingException
start
private void start()
run
public void run()
- Specified by:
run in interface java.lang.Runnable