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

setPronunciationAssessmentParams(string)
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

setPronunciationAssessmentParams(string)

function setPronunciationAssessmentParams(params: string)

Parameters

params

string

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 serializable object that represents the value.

toJSON()

function toJSON()

Returns

string