Members
(static) isAvailable :function
Checks if voice recognition is available on current system.
Type:
- function
(static) isRecognizing :function
Checks if voice recognition is in progress (on any instance).
Type:
- function
Methods
addEventListener(eventName, listener)
Adds listener for specified event
Parameters:
Name | Type | Description |
---|---|---|
eventName |
VoiceEvent | |
listener |
function |
Throws:
-
if called on destroyed instance
- Type
- Error
cancel()
Cancels recognizing, no `results` or `error` events will be send.
Throws:
-
if another instance started recognition (repeating cancel when nothing is recognizing is allowed) or when called on destroyed instance
- Type
- Error
destroy()
Destroys the instance, removes listener, cancels recognition
Throws:
-
if called on destroyed instance
- Type
- Error
removeEventListener(eventName, listener)
Removed specified listener from specified event
Parameters:
Name | Type | Description |
---|---|---|
eventName |
VoiceEvent | |
listener |
function |
Throws:
-
if called on destroyed instance
- Type
- Error
start(locale)
Starts recognizing
Parameters:
Name | Type | Description |
---|---|---|
locale |
string |
Throws:
-
if another instance is already recognizing (same instance is allowed to restart recognizing) or when called on destroyed instance
- Type
- Error
stop()
Stops recognizing, it should cause `results` or `error` event to be send
Throws:
-
if another instance started recognition (repeating stop when nothing is recognizing is allowed) or when called on destroyed instance
- Type
- Error