> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt # ASR Represents an ASR object provides speech recognition capabilities. Audio stream can be sent to an ASR instance from [Call](/api-reference/voxengine/call), [Player](/api-reference/voxengine/player) or [Conference](/api-reference/voxengine/conference) instances. Parameters **language** or **dictionary** should be passed to the `VoxEngine.createASR` function. Add the following line to your scenario code to use the class: ``` require(Modules.ASR); ``` ## Constructor ```ts new ASR(id: string, language: string, dictionary: string) ``` **Parameters** **`id`** `string` — required --- **`language`** `string` — required --- **`dictionary`** `string` — required --- ```ts new ASR(id: string, language: string, dictionary: string) ``` **Parameters** **`id`** `string` — required --- **`language`** `string` — required --- **`dictionary`** `string` — required --- ## Methods ### addEventListener Adds a handler for the specified [ASREvents](/api-reference/voxengine/asr-events) event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called. ```ts addEventListener(event: ASREvents | T, callback: (event: _ASREvents[T]) => any): void ``` **Parameters** **`event`** `ASREvents | T` — required --- **`callback`** `(event: _ASREvents[T]) => any` — required --- ### dictionary Returns the asr's dictionary. ```ts dictionary(): string[] ``` ### id Returns the asr's id. ```ts id(): string ``` ### language Returns the asr's language. ```ts language(): string ``` ### removeEventListener Removes a handler for the specified [ASREvents](/api-reference/voxengine/asr-events) event. ```ts removeEventListener(event: ASREvents | T, callback?: (event: _ASREvents[T]) => any): void ``` **Parameters** **`event`** `ASREvents | T` — required --- **`callback`** `(event: _ASREvents[T]) => any` --- ### stop Stops recognition. Triggers the `ASREvents.Stopped` event. Do not call any other ASR functions/handlers after the **ASR.stop** call. ```ts stop(): void ``` > Represents an ASR object provides speech recognition capabilities.