Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
TheSpeechRecognizer
API provides facilities to recognize voice commands.
Speech recognition is enabled or disabled via the Developer > Scripting > Enable Speech Control API menu item or the SpeechRecognizer.setEnabled method.
Methods
Name | Return Value | Summary |
---|---|---|
addCommand
|
None |
Adds a voice command to the speech recognizer. |
removeCommand
|
None |
Removes a voice command from the speech recognizer. |
setEnabled
|
None |
Enables or disables speech recognition. |
Signals
Name | Summary |
---|---|
commandRecognized
|
Triggered when a voice command has been recognized. |
enabledUpdated
|
Triggered when speech recognition is enabled or disabled. |
Method Details
(static) addCommand( command ) | ||||||
---|---|---|---|---|---|---|
Adds a voice command to the speech recognizer. Parameters
|
(static) removeCommand( command ) | ||||||
---|---|---|---|---|---|---|
Removes a voice command from the speech recognizer. Parameters
|
(static) setEnabled( enabled ) | ||||||
---|---|---|---|---|---|---|
Enables or disables speech recognition. Parameters
|
Signal Details
commandRecognized(
command
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when a voice command has been recognized. Parameters
Example
|
enabledUpdated(
enabled
)
Returns: Signal |
||||||
---|---|---|---|---|---|---|
Triggered when speech recognition is enabled or disabled. Parameters
Example
|