SIGN UP

ASR

Methods

addEventListener

addEventListener(asrevent: Function, handler: Function): void

Adds handler for specific event generated by ASR. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler will be called.

Parameters

  • asrevent:

    Function

    Event class (i.e., ASREvents.Stopped)

  • handler:

    Function

    Handler function. A single parameter is passed - object with event information

Returns

  • Return:

    void

removeEventListener

removeEventListener(asrevent: Function, handler: Function): void

Removes handler for specific event generated by ASR

Parameters

  • asrevent:

    Function

    Event class (i.e., ASREvents.Stopped)

  • handler:

    Function
    Optional

    Handler function. If not specified, all event listeners are removed

Returns

  • Return:

    void

stop

stop(): void

Stops recognition. Causes ASREvents.Stopped to be triggered. You must not call any other ASR functions/handlers after the ASR.stop call.

Returns

  • Return:

    void