Table of Contents

Class SpeechGrammarList

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
IMPORTANT
Deprecated
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).

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.

-Web Speech API

See also on MDN

Constructors

SpeechGrammarList()

IMPORTANT
Deprecated
The SpeechGrammarList() constructor creates a new
SpeechGrammarList object instance.
public SpeechGrammarList()

Remarks

Properties

Length

IMPORTANT
Deprecated
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)

IMPORTANT
Deprecated
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)

IMPORTANT
Deprecated
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