How Tos

Last reviewed: 3/1/2012

Article ID: H031202

HOW: Developing Microsoft Speech Platform applications that manage lexicons

The information in this article applies to:

  • LexiconKit 4

Summary

LexiconKit 4 provides support for Microsoft Speech Platform.

More Information

Chant LexiconKit 4 provides support creating and editing application lexicons for Microsoft Speech Platform recognizers and voices.

Both 32-bit and 64-bit applications can create and edit lexicons for Microsoft Speech Platform recognizers and voices. The 32-bit Microsoft Speech Platform runtime must be installed to support 32-bit applications. The 64-bit Microsoft Speech Platform runtime must be installed to support 64-bit applications.

All current Microsoft Speech Platform versions are supported: v10.0, v10.1, v10.2 and v11.0. Only one version may be installed at a time. The runtimes, recognizers, and voices can be downloaded from Microsoft:

The recognizer for which to create and edit lexicons can be selected by setting the CSPEngine property to recognizer name or by setting the CNPEngineAPI value to CEMSPSR. The voice for which to create and edit lexicons can be selected by setting the CSPEngine property to voice name or by setting the CNPEngineAPI value to CEMSPTTS.

private Chant.LexiconKit.NChantLM NChantLM1;

// Instantiate NChantLM object
NChantLM1 = new NChantLM(this);
NChantLM1.SetStringProperty(ChantStringProperty.CSPEngine, "Microsoft Mary");

// Define an empty MSP application lexicon
resourceID = NChantLM1.DefineResource(ChantSpeechResource.CSRAppLexicon, "MaryWords", "Microsoft Mary");

// Add pronunciation to a lexicon resource
NChantLM1.AddResource(ChantSpeechResource.CSRLexiconWordPronunciation, resourceID, "tomato", "t ax m aa t ow", ChantPartOfSpeech.CPOSNoun, 1);

// Export a lexicon resource to a file
NChantLM1.ExportResource(resourceID, "marywords.exe", 0);