com.getflourish.stt
Class STT

java.lang.Object
  extended by com.getflourish.stt.STT

public class STT
extends java.lang.Object

Converts speech to text using the x-webkit-speech technology found in Chrome.

Author:
Florian Schulz

Field Summary
static int ERROR
           
static int RECORDING
           
static int SUCCESS
           
static int TRANSCRIBING
           
 
Constructor Summary
STT(processing.core.PApplet _p)
           
STT(processing.core.PApplet _p, boolean history)
           
 
Method Summary
 void begin()
          Starts a record
 void disableAutoRecord()
           
 void disableAutoThreshold()
          Disables the analysis of the environmental volume after initialization.
 void disableDebug()
           
 void disableHistory()
          Records will be deleted
 void dispose()
           
 void draw()
           
 void enableAutoRecord()
          Enables the automatic recording if the set voulme threshold has been reached
 void enableAutoRecord(float threshold)
          Enables the automatic recording if the given voulme threshold has been reached
 void enableAutoThreshold()
          Enables the analysis of the environmental volume after initialization.
 void enableDebug()
          Enables logging of events like recording, transcribing, success, error.
 void enableHistory()
          Records will be kept in the data folder
 void end()
          Ends a record
 java.lang.String getLanguage()
           
 ddf.minim.Minim getMinimInstance()
          Returns the Minim instance for access in programs that need to use Minim beside STT
 float getThreshold()
           
 float getVolume()
           
 void setLanguage(java.lang.String language)
           
 void setThreshold(float threshold)
          Sets the volume threshold that is used to recognize speech and to filter background noise.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RECORDING

public static final int RECORDING
See Also:
Constant Field Values

SUCCESS

public static final int SUCCESS
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

TRANSCRIBING

public static final int TRANSCRIBING
See Also:
Constant Field Values
Constructor Detail

STT

public STT(processing.core.PApplet _p,
           boolean history)
Parameters:
_p - instance of PApplet
history - indicates whether or not recordings are stored in the data folder

STT

public STT(processing.core.PApplet _p)
Parameters:
_p - instance of PApplet
Method Detail

draw

public void draw()

enableDebug

public void enableDebug()
Enables logging of events like recording, transcribing, success, error.


disableDebug

public void disableDebug()

getThreshold

public float getThreshold()

setThreshold

public void setThreshold(float threshold)
Sets the volume threshold that is used to recognize speech and to filter background noise.


getVolume

public float getVolume()

enableHistory

public void enableHistory()
Records will be kept in the data folder


disableHistory

public void disableHistory()
Records will be deleted


enableAutoThreshold

public void enableAutoThreshold()
Enables the analysis of the environmental volume after initialization.


disableAutoThreshold

public void disableAutoThreshold()
Disables the analysis of the environmental volume after initialization.


enableAutoRecord

public void enableAutoRecord()
Enables the automatic recording if the set voulme threshold has been reached


enableAutoRecord

public void enableAutoRecord(float threshold)
Enables the automatic recording if the given voulme threshold has been reached

Parameters:
threshold - the threshold that can be checked with getVolume()

disableAutoRecord

public void disableAutoRecord()

getLanguage

public java.lang.String getLanguage()

setLanguage

public void setLanguage(java.lang.String language)
Parameters:
language - en, de, fr, etc. If the language is not supported it will automatically fall back to English.

dispose

public void dispose()

getMinimInstance

public ddf.minim.Minim getMinimInstance()
Returns the Minim instance for access in programs that need to use Minim beside STT


begin

public void begin()
Starts a record


end

public void end()
Ends a record