SpeechRecognition extension type
The SpeechRecognition
interface of the
Web Speech API
is the controller interface for the recognition service; this also handles
the SpeechRecognitionEvent sent from the recognition service.
Note: On some browsers, like Chrome, using Speech Recognition on a web page involves a server-based recognition engine. Your audio is sent to a web service for recognition processing, so it won't work offline.
API documentation sourced from MDN Web Docs.
- on
- Implemented types
- Available extensions
Constructors
- SpeechRecognition()
-
factory
Properties
- continuous ↔ bool
-
The
continuous
property of the SpeechRecognition interface controls whether continuous results are returned for each recognition, or only a single result.getter/setter pair - grammars ↔ JSObject
-
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 currentSpeechRecognition
.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- interimResults ↔ bool
-
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. the SpeechRecognitionResult.isFinal property isfalse
).getter/setter pair - lang ↔ String
-
The
lang
property of the SpeechRecognition interface returns and sets the language of the currentSpeechRecognition
. If not specified, this defaults to the HTMLlang
attribute value, or the user agent's language setting if that isn't set either.getter/setter pair - maxAlternatives ↔ int
-
The
maxAlternatives
property of the SpeechRecognition interface sets the maximum number of SpeechRecognitionAlternatives provided per SpeechRecognitionResult.getter/setter pair - onaudioend ↔ EventHandler?
-
getter/setter pair
- onaudiostart ↔ EventHandler?
-
getter/setter pair
- onend ↔ EventHandler?
-
getter/setter pair
- onerror ↔ EventHandler?
-
getter/setter pair
- onnomatch ↔ EventHandler?
-
getter/setter pair
- onresult ↔ EventHandler?
-
getter/setter pair
- onsoundend ↔ EventHandler?
-
getter/setter pair
- onsoundstart ↔ EventHandler?
-
getter/setter pair
- onspeechend ↔ EventHandler?
-
getter/setter pair
- onspeechstart ↔ EventHandler?
-
getter/setter pair
- onstart ↔ EventHandler?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
abort(
) → void -
The
abort()
method of the Web Speech API stops the speech recognition service from listening to incoming audio, and doesn't attempt to return a SpeechRecognitionResult. -
addEventListener(
String type, EventListener? callback, [JSAny options]) → void -
The
addEventListener()
method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.inherited -
dispatchEvent(
Event event) → bool -
The
dispatchEvent()
method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually withdispatchEvent()
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeEventListener(
String type, EventListener? callback, [JSAny options]) → void -
The
removeEventListener()
method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.inherited -
start(
) → void -
The
start()
method of the Web Speech API starts the speech recognition service listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition. -
stop(
) → void -
The
stop()
method of the Web Speech API stops the speech recognition service from listening to incoming audio, and attempts to return a SpeechRecognitionResult using the audio captured so far. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited