---
title: "SpeechRecognitionResult | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

# Interface SpeechRecognitionResult

The **`SpeechRecognitionResult`** interface of the Web Speech API represents a single recognition match, which may contain multiple SpeechRecognitionAlternative objects. Available only in secure contexts.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/SpeechRecognitionResult)

interface SpeechRecognitionResult {  
    [isFinal](#isfinal): boolean;  
    [length](#length): number;  
    ["\[iterator\]"](#iterator-1)(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[SpeechRecognitionAlternative](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.SpeechRecognitionAlternative/)\>;  
    [item](#item-1)(index: number): [SpeechRecognitionAlternative](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.SpeechRecognitionAlternative/);  
    \[index: number\]: [SpeechRecognitionAlternative](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.SpeechRecognitionAlternative/);  
}

#### Indexable

-   \[index: number\]: [SpeechRecognitionAlternative](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.SpeechRecognitionAlternative/)
    

##### Index

### Properties[](#properties)

[isFinal](#isfinal) [length](#length)

### Methods[](#methods)

[\[iterator\]](#iterator) [item](#item)

## Properties[](#properties-1)

### `Readonly`isFinal[](#isfinal)

isFinal: boolean

The **`isFinal`** read-only property of the SpeechRecognitionResult interface is a boolean value that states whether this result is final (true) or not (false) — if so, then this is the final time this result will be returned; if not, then this result is an interim result, and may be updated later on.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/SpeechRecognitionResult/isFinal)

### `Readonly`length[](#length)

length: number

The **`length`** read-only property of the SpeechRecognitionResult interface returns the length of the "array" — the number of SpeechRecognitionAlternative objects contained in the result (also referred to as "n-best alternatives".)

[MDN Reference](https://developer.mozilla.org/docs/Web/API/SpeechRecognitionResult/length)

## Methods[](#methods-1)

### \[iterator\][](#iterator)

-   "\[iterator\]"(): [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[SpeechRecognitionAlternative](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.SpeechRecognitionAlternative/)\>[](#iterator-1)
    
    #### Returns [ArrayIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ArrayIterator/)<[SpeechRecognitionAlternative](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.SpeechRecognitionAlternative/)\>
    

### item[](#item)

-   item(index: number): [SpeechRecognitionAlternative](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.SpeechRecognitionAlternative/)[](#item-1)
    
    The **`item`** getter of the SpeechRecognitionResult interface is a standard getter that allows SpeechRecognitionAlternative objects within the result to be accessed via array syntax.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/SpeechRecognitionResult/item)
    
    #### Parameters
    
    -   index: number
    
    #### Returns [SpeechRecognitionAlternative](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.SpeechRecognitionAlternative/)
