@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="Object")
public class SpeechRecognition
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
boolean |
continuous
The continuous property of the SpeechRecognition interface controls whether continuous results are returned for each recognition, or only a single result.
|
SpeechGrammarList |
grammars
The grammars property of the SpeechRecognition interface returns and sets a collection of SpeechGrammar objects that represent the grammars that will be understood by the current SpeechRecognition.
|
boolean |
interimResults
The interimResults property of the SpeechRecognition interface controls whether interim results should be returned (true) or not (false.) Interim results are results that are not yet final (e.g.
|
java.lang.String |
lang
The lang property of the SpeechRecognition interface returns and sets the language of the current SpeechRecognition.
|
int |
maxAlternatives
The maxAlternatives property of the SpeechRecognition interface sets the maximum number of SpeechRecognitionAlternatives provided per SpeechRecognitionResult.
|
EventHandler |
onaudioend
The onaudioend property of the SpeechRecognition interface represents an event handler that will run when the user agent has finished capturing audio (when the audioend event fires.)
|
EventHandler |
onaudiostart
The onaudiostart property of the SpeechRecognition interface represents an event handler that will run when the user agent has started to capture audio (when the audiostart event fires.)
|
EventHandler |
onend
The onend property of the SpeechRecognition interface represents an event handler that will run when the speech recognition service has disconnected (when the end event fires.)
|
SpeechRecognitionErrorEventHandler |
onerror
The onerror property of the SpeechRecognition interface represents an event handler that will run when a speech recognition error occurs (when the error event fires.)
|
SpeechRecognitionEventHandler |
onnomatch
The onnomatch property of the SpeechRecognition interface represents an event handler that will run when the speech recognition service returns a final result with no significant recognition (when the nomatch event fires.)
|
SpeechRecognitionEventHandler |
onresult
The onresult property of the SpeechRecognition interface represents an event handler that will run 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 (when the result event fires.)
|
EventHandler |
onsoundend
The onsoundend property of the SpeechRecognition interface represents an event handler that will run when any sound — recognisable speech or not — has stopped being detected (when the soundend event fires.)
|
EventHandler |
onsoundstart
The onsoundstart property of the SpeechRecognition interface represents an event handler that will run when any sound — recognisable speech or not — has been detected (when the soundstart event fires.)
|
EventHandler |
onspeechend
The onspeechend property of the SpeechRecognition interface represents an event handler that will run when speech recognised by the speech recognition service has stopped being detected (when the speechend event fires.)
|
EventHandler |
onspeechstart
The onspeechstart property of the SpeechRecognition interface represents an event handler that will run when sound recognised by the speech recognition service as speech has been detected (when the speechstart event fires.)
|
EventHandler |
onstart
The onstart property of the SpeechRecognition interface represents an event handler that will run when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition (when the start event fires.)
|
| Constructor and Description |
|---|
SpeechRecognition()
The SpeechRecognition() constructor creates a new SpeechRecognition object instance.
|
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListenerpublic boolean continuous
@Nonnull public SpeechGrammarList grammars
public boolean interimResults
@Nonnull public java.lang.String lang
public int maxAlternatives
@Nullable public EventHandler onaudioend
@Nullable public EventHandler onaudiostart
@Nullable public EventHandler onend
@Nullable public SpeechRecognitionErrorEventHandler onerror
@Nullable public SpeechRecognitionEventHandler onnomatch
@Nullable public SpeechRecognitionEventHandler onresult
@Nullable public EventHandler onsoundend
@Nullable public EventHandler onsoundstart
@Nullable public EventHandler onspeechend
@Nullable public EventHandler onspeechstart
@Nullable public EventHandler onstart
public SpeechRecognition()
public void abort()
public void start()
public void stop()
@JsOverlay
public final void addErrorListener(@Nonnull
SpeechRecognitionErrorEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addErrorListener(@Nonnull
SpeechRecognitionErrorEventListener callback,
boolean useCapture)
@JsOverlay
public final void addErrorListener(@Nonnull
SpeechRecognitionErrorEventListener callback)
@JsOverlay
public final void removeErrorListener(@Nonnull
SpeechRecognitionErrorEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeErrorListener(@Nonnull
SpeechRecognitionErrorEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeErrorListener(@Nonnull
SpeechRecognitionErrorEventListener callback)
@JsOverlay
public final void addNomatchListener(@Nonnull
SpeechRecognitionEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addNomatchListener(@Nonnull
SpeechRecognitionEventListener callback,
boolean useCapture)
@JsOverlay
public final void addNomatchListener(@Nonnull
SpeechRecognitionEventListener callback)
@JsOverlay
public final void removeNomatchListener(@Nonnull
SpeechRecognitionEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeNomatchListener(@Nonnull
SpeechRecognitionEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeNomatchListener(@Nonnull
SpeechRecognitionEventListener callback)
@JsOverlay
public final void addResultListener(@Nonnull
SpeechRecognitionEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addResultListener(@Nonnull
SpeechRecognitionEventListener callback,
boolean useCapture)
@JsOverlay
public final void addResultListener(@Nonnull
SpeechRecognitionEventListener callback)
@JsOverlay
public final void removeResultListener(@Nonnull
SpeechRecognitionEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeResultListener(@Nonnull
SpeechRecognitionEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeResultListener(@Nonnull
SpeechRecognitionEventListener callback)
@JsOverlay
public final void addAudioendListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addAudioendListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addAudioendListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeAudioendListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeAudioendListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeAudioendListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addAudiostartListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addAudiostartListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addAudiostartListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeAudiostartListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeAudiostartListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeAudiostartListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addEndListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addEndListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addEndListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeEndListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeEndListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeEndListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addSoundendListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addSoundendListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addSoundendListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeSoundendListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeSoundendListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeSoundendListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addSoundstartListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addSoundstartListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addSoundstartListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeSoundstartListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeSoundstartListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeSoundstartListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addSpeechendListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addSpeechendListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addSpeechendListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeSpeechendListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeSpeechendListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeSpeechendListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addSpeechstartListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addSpeechstartListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addSpeechstartListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeSpeechstartListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeSpeechstartListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeSpeechstartListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addStartListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addStartListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addStartListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeStartListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeStartListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeStartListener(@Nonnull
EventListener callback)