Class SpeechRecognitionEvent
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The SpeechRecognitionEvent interface of the Web Speech API represents the event object for the SpeechRecognition.Result and SpeechRecognition.Nomatch events, and contains all the data associated with an interim or final speech recognition result.
[Value("SpeechRecognitionEvent")]
public class SpeechRecognitionEvent : Event
- Inheritance
-
SpeechRecognitionEvent
- Inherited Members
Remarks
Constructors
SpeechRecognitionEvent()
public SpeechRecognitionEvent()
SpeechRecognitionEvent(string, SpeechRecognitionEventInit)
public SpeechRecognitionEvent(string type, SpeechRecognitionEventInit eventInitDict)
Parameters
typestringeventInitDictSpeechRecognitionEventInit
Properties
ResultIndex
The resultIndex read-only property of the
SpeechRecognitionEvent interface returns the lowest index value result in
the SpeechRecognitionResultList "array" that has actually changed.
[Value("resultIndex")]
public ulong ResultIndex { get; }
Property Value
- ulong
A number.
Remarks
The SpeechRecognitionResultList object is not an array, but it has a
getter that allows it to be accessed by array syntax.
Results
The results read-only property of the
SpeechRecognitionEvent interface returns a
SpeechRecognitionResultList object representing all the speech
recognition results for the current session.
[Value("results")]
public SpeechRecognitionResultList Results { get; }
Property Value
Remarks
Specifically this object will contain all final results that have been returned,
followed by the current best hypothesis for all interim results. When subsequent
SpeechRecognition.Result events are fired, interim results may be overwritten by a newer
interim result or by a final result — they may even be removed, if they are at the end
of the "results" array and the array length decreases. Final results on the other hand
will not be overwritten or removed.