Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

SrgsDocument.AddLexicon Method

Adds a link to the specified lexicon.

Namespace:  Microsoft.Speech.Recognition.SrgsGrammar
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

Syntax

'Declaration
Public Sub AddLexicon ( _
    lexiconUri As Uri _
)
'Usage
Dim instance As SrgsDocument
Dim lexiconUri As Uri

instance.AddLexicon(lexiconUri)
public void AddLexicon(
    Uri lexiconUri
)

Parameters

Remarks

A pronunciation lexicon is a collection of words or phrases together with their pronunciations, which consist of letters and characters from a supported phonetic alphabet. You can reference only one lexicon from an SrgsDocument grammar.

Pronunciations specified in an external lexicon file take precedence over the pronunciations of the speech recognition engine's internal lexicon or dictionary. However, pronunciations specified inline using the Pronunciation property of the SrgsToken object take precedence over pronunciations specified in any lexicon. Inline pronunciations apply only to a single occurrence of a word. By contrast, pronunciations specified in a lexicon apply to all occurrences of a word in a grammar.

See Also

Reference

SrgsDocument Class

SrgsDocument Members

Microsoft.Speech.Recognition.SrgsGrammar Namespace