SpeechGrammarList extension type
The SpeechGrammarList
interface of the
Web Speech API
represents a list of SpeechGrammar objects containing words or patterns of
words that we want the recognition service to recognize.
Grammar is defined using JSpeech Grammar Format (JSGF.) Other formats may also be supported in the future.
Constructors
- SpeechGrammarList()
-
factory
Properties
Methods
-
addFromString(
String string, [num weight]) → void -
The
addFromString()
method of the SpeechGrammarList interface takes a grammar present in a specific string within the code base (e.g. stored in a variable) and adds it to theSpeechGrammarList
as a new SpeechGrammar object. -
addFromURI(
String src, [num weight]) → void -
The
addFromURI()
method of the SpeechGrammarList interface takes a grammar present at a specific URI and adds it to theSpeechGrammarList
as a new SpeechGrammar object. -
item(
int index) → SpeechGrammar -
The
item
getter of the SpeechGrammarList interface is a standard getter — it allows individual SpeechGrammar objects to be retrieved from theSpeechGrammarList
using array syntax. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited