fi.hut.tml.xsmiles.speech
Class RecognizerImpl

java.lang.Object
  extended byResultAdapter
      extended byfi.hut.tml.xsmiles.speech.RecognizerImpl
All Implemented Interfaces:
Recognizer

public class RecognizerImpl
extends ResultAdapter
implements Recognizer

Author:
honkkis
See Also:
Serialized Form

Field Summary
 java.util.Vector listeners
           
protected  boolean should_stop
           
protected  int status
           
protected  int STATUS_NOT_INITIALIZED
           
protected  int STATUS_PAUSED
           
protected  int STATUS_STARTED
           
 java.lang.String testGrammarStr
           
 
Constructor Summary
RecognizerImpl()
           
 
Method Summary
 void addXResultListener(XRecognizerListener l)
           
 java.util.Vector getLastResult()
           
 void getOneResultAsync()
          gets one result asynchronously, note that you have to set the result listener, in order to get the results, since this method returns immediately
 java.lang.String getOneResultSync()
           
protected  void init()
           
protected  Result recognize()
          TODO: return a result object
 void removeXResultListener(XRecognizerListener l)
           
 void setGrammar(java.io.Reader r)
           
 void start()
           
 void stop()
           
 void stopRecognizing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

testGrammarStr

public java.lang.String testGrammarStr

STATUS_NOT_INITIALIZED

protected final int STATUS_NOT_INITIALIZED
See Also:
Constant Field Values

STATUS_PAUSED

protected final int STATUS_PAUSED
See Also:
Constant Field Values

STATUS_STARTED

protected final int STATUS_STARTED
See Also:
Constant Field Values

should_stop

protected boolean should_stop

status

protected int status

listeners

public java.util.Vector listeners
Constructor Detail

RecognizerImpl

public RecognizerImpl()
Method Detail

setGrammar

public void setGrammar(java.io.Reader r)
                throws java.lang.Exception
Specified by:
setGrammar in interface Recognizer
Throws:
java.lang.Exception

init

protected void init()

start

public void start()

addXResultListener

public void addXResultListener(XRecognizerListener l)
Specified by:
addXResultListener in interface Recognizer

removeXResultListener

public void removeXResultListener(XRecognizerListener l)

stop

public void stop()

recognize

protected Result recognize()
TODO: return a result object

Returns:

getLastResult

public java.util.Vector getLastResult()

getOneResultSync

public java.lang.String getOneResultSync()
Specified by:
getOneResultSync in interface Recognizer

getOneResultAsync

public void getOneResultAsync()
Description copied from interface: Recognizer
gets one result asynchronously, note that you have to set the result listener, in order to get the results, since this method returns immediately

Specified by:
getOneResultAsync in interface Recognizer

stopRecognizing

public void stopRecognizing()
Specified by:
stopRecognizing in interface Recognizer


X-Smiles 1.2