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.
Indexable
[index: number]: SpeechRecognitionAlternative
Methods
[iterator]()
iterator: ArrayIterator<SpeechRecognitionAlternative>;
Returns
ArrayIterator<SpeechRecognitionAlternative>
item()
item(index): SpeechRecognitionAlternative;
The item getter of the SpeechRecognitionResult interface is a standard getter that allows SpeechRecognitionAlternative objects within the result to be accessed via array syntax.
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
Properties
isFinal
readonly 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.
length
readonly 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".)