SpeechContext class

Represents the JSON used in the speech.context message sent to the speech service. The dynamic grammar is always refreshed from the encapsulated dynamic grammar object.

Constructors

SpeechContext(DynamicGrammarBuilder)

Methods

setSection(string, any)

Adds a section to the speech.context object.

toJSON()

Constructor Details

SpeechContext(DynamicGrammarBuilder)

new SpeechContext(dynamicGrammar: DynamicGrammarBuilder)

Parameters

dynamicGrammar
DynamicGrammarBuilder

Method Details

setSection(string, any)

Adds a section to the speech.context object.

function setSection(sectionName: string, value: any)

Parameters

sectionName
string

Name of the section to add.

value
any

JSON serializeable object that represents the value.

toJSON()

function toJSON()

Returns

string