Table of Contents

Class SpeechGrammarList

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
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.
[Value("SpeechGrammarList")]
public class SpeechGrammarList
Inheritance
SpeechGrammarList
Inherited Members

Remarks

Grammar is defined using JSpeech Grammar Format (JSGF.) Other formats may also be supported in the future.

-Web Speech API

See also on MDN

Constructors

SpeechGrammarList()

NOTE
Experimental
The SpeechGrammarList() constructor creates a new
SpeechGrammarList object instance.
public SpeechGrammarList()

Remarks

Properties

Length

NOTE
Experimental
The length read-only property of the
SpeechGrammarList 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)

NOTE
Experimental
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
the SpeechGrammarList as a new SpeechGrammar object.
[Value("addFromString")]
public GlobalObject.Undefined AddFromString(string string_, Number weight = null)

Parameters

string_ string
weight Number

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

AddFromURI(string, Number)

NOTE
Experimental
The addFromURI() method of the
SpeechGrammarList interface takes a grammar present at a specific URI and
adds it to the SpeechGrammarList as a new SpeechGrammar
object.
[Value("addFromURI")]
public GlobalObject.Undefined AddFromURI(string src, Number weight = null)

Parameters

src string
weight Number

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

Note that some speech recognition services may support built-in grammars that can be
specified by URI.

-Web Speech API

See also on MDN