simpleSpeech
Class Listen

java.lang.Object
  extended by simpleSpeech.Listen
All Implemented Interfaces:
java.lang.Runnable

public class Listen
extends java.lang.Object
implements java.lang.Runnable

Listen: a Class for speech recognition (using the Sphinx engine


Constructor Summary
Listen(processing.core.PApplet _p, java.lang.String _c)
          Constructor: instantiate the class in procesing's standard way: pass "this" as a parameter, when instantiating in a Processing applet
 
Method Summary
 void dispose()
          Dispose the Recognizer
 boolean isRecording()
          Is the Microphone recording?
 void makeEvent()
          Create the Listen Event
 java.lang.String readString()
          Returns a string with the recognised text It should be called within the listenEvent() handler
void listenEvent(Listen _l) {
   // GET RECOGNISED TEXT
   stringRead = _l.readString();
}
 void run()
          Run the Recognizer
 void version()
          Displays Version Information Of This Library In The Console
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Listen

public Listen(processing.core.PApplet _p,
              java.lang.String _c)
Constructor: instantiate the class in procesing's standard way: pass "this" as a parameter, when instantiating in a Processing applet

Parameters:
_p - Processing applet
_c - name of the configuration file (e.g. sample.config.xml)
Method Detail

run

public void run()
Run the Recognizer

Specified by:
run in interface java.lang.Runnable

readString

public java.lang.String readString()
Returns a string with the recognised text It should be called within the listenEvent() handler
void listenEvent(Listen _l) {
   // GET RECOGNISED TEXT
   stringRead = _l.readString();
}

Returns:
recognized text

makeEvent

public void makeEvent()
Create the Listen Event


isRecording

public boolean isRecording()
Is the Microphone recording?

Returns:
Is the Microphone recording?

version

public void version()
Displays Version Information Of This Library In The Console


dispose

public void dispose()
Dispose the Recognizer