VoiceToText

VoiceToText

new VoiceToText()

Source:

Members

(static) isAvailable :function

Source:
Checks if voice recognition is available on current system.
Type:
  • function

(static) isRecognizing :function

Source:
Checks if voice recognition is in progress (on any instance).
Type:
  • function

Methods

addEventListener(eventName, listener)

Source:
Adds listener for specified event
Parameters:
Name Type Description
eventName VoiceEvent
listener function
Throws:
if called on destroyed instance
Type
Error

cancel()

Source:
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()

Source:
Destroys the instance, removes listener, cancels recognition
Throws:
if called on destroyed instance
Type
Error

removeEventListener(eventName, listener)

Source:
Removed specified listener from specified event
Parameters:
Name Type Description
eventName VoiceEvent
listener function
Throws:
if called on destroyed instance
Type
Error

start(locale)

Source:
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()

Source:
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