Content:
- Methods

The SpeechRec object can be used to listen for and recognize speech.

spr = app.CreateSpeechRec( options ) → app object: SpeechRec

Use the Recognize method of the SpeechRec object to tell it to start listening:
speech.Recognize();

When the SpeechRec object has started listening, the OnReady callback function will be called. Use the SetOnReady method to set the name of your OnReady callback function.

If the SpeechRec object recognizes speech, the OnResult callback function will be called. The results are passed to the OnResult callback function as an array, with the most probable result at the front. Use the SetOnResult method to set the name of your OnResult callback function.

If the SpeechRec object does not recognize anything, the OnError callback function will be called. Use the SetOnError method to set the name of your OnError callback function.

Example - Example click to expand contents 

Methods

The following methods are available on the SpeechRec object:

Cancel()
GetRMS() → Number: float
GetType() → String: “SpeechRec”
IsListening() → Boolean
Method( name, types, p1, p2, p3, p4 ) → all types
Stop()