Class SpeechGrammarList
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
IMPORTANT
DeprecatedSpeechGrammarList 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.
[Value("SpeechGrammarList")]
public class SpeechGrammarList
- Inheritance
-
SpeechGrammarList
- Inherited Members
Remarks
Grammar is defined using JSpeech Grammar Format (JSGF).
NOTE
The concept of grammar has been removed from the Web Speech API. Related features remain in the specification and are still recognized by supporting browsers for backwards compatibility, but they have no effect on speech recognition services.
Constructors
SpeechGrammarList()
IMPORTANT
DeprecatedSpeechGrammarList() constructor creates a newSpeechGrammarList object instance.
public SpeechGrammarList()
Remarks
Properties
Length
IMPORTANT
Deprecatedlength read-only property of theSpeechGrammarList interface returns the number of
SpeechGrammar objects contained in the SpeechGrammarList.
[Value("length")]
public ulong Length { get; }
Property Value
- ulong
A number indicating the number of SpeechGrammar objects contained in the
SpeechGrammarList.
Remarks
Methods
AddFromString(string, Number)
IMPORTANT
DeprecatedaddFromString() method of theSpeechGrammarList interface takes a grammar present in a specific
string within the code base (e.g., stored in a variable) and adds it to
the
SpeechGrammarList as a new SpeechGrammar object.
[Value("addFromString")]
public GlobalObject.Undefined AddFromString(string string_, Number weight = null)
Parameters
Returns
Remarks
AddFromURI(string, Number)
IMPORTANT
DeprecatedaddFromURI() method of theSpeechGrammarList interface takes a grammar present at a specific URI and
adds it to the
SpeechGrammarList as a new SpeechGrammarobject.
[Value("addFromURI")]
public GlobalObject.Undefined AddFromURI(string src, Number weight = null)
Parameters
Returns
Remarks
Note that some speech recognition services may support built-in grammars that can be
specified by URI.