package js.html
extends EventTarget
Available on jsThe
SpeechRecognitioninterface of the Web Speech API is the controller interface for the recognition service; this also handles theSpeechRecognitionEventsent from the recognition service.Documentation SpeechRecognition by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
new ()Throws:
null |
DOMError |
|---|
continuous:BoolControls whether continuous results are returned for each recognition, or only a single result. Defaults to single (false.)
grammars:SpeechGrammarListReturns and sets a collection of SpeechGrammar objects that represent the grammars that will be understood by the current SpeechRecognition.
interimResults:BoolControls whether interim results should be returned (true) or not (false.) Interim results are results that are not yet final (e.g. the SpeechRecognitionResult.isFinal property is false.)
lang:StringReturns and sets the language of the current SpeechRecognition. If not specified, this defaults to the HTML lang attribute value, or the user agent's language setting if that isn't set either.
maxAlternatives:IntSets the maximum number of SpeechRecognitionAlternatives provided per result. The default value is 1.
onaudioend:FunctionFired when the user agent has finished capturing audio.
onaudiostart:FunctionFired when the user agent has started to capture audio.
onend:FunctionFired when the speech recognition service has disconnected.
onerror:FunctionFired when a speech recognition error occurs.
onnomatch:FunctionFired when the speech recognition service returns a final result with no significant recognition. This may involve some degree of recognition, which doesn't meet or exceed the SpeechRecognitionAlternative.confidence threshold.
onresult:FunctionFired when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app.
onsoundend:FunctionFired when any sound — recognisable speech or not — has stopped being detected.
onsoundstart:FunctionFired when any sound — recognisable speech or not — has been detected.
onspeechend:FunctionFired when speech recognised by the speech recognition service has stopped being detected.
onspeechstart:FunctionFired when sound that is recognised by the speech recognition service as speech has been detected.
onstart:FunctionFired when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition.
serviceURI:StringSpecifies the location of the speech recognition service used by the current SpeechRecognition to handle the actual recognition. The default is the user agent's default speech service.
abort ():VoidStops the speech recognition service from listening to incoming audio, and doesn't attempt to return a SpeechRecognitionResult.
start (?stream:MediaStream):VoidThrows:
null |
DOMError |
|---|
stop ():VoidStops the speech recognition service from listening to incoming audio, and attempts to return a SpeechRecognitionResult using the audio captured so far.
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/SpeechRecognition.html