How Tos
Last reviewed: 6/1/2014
Article ID: H061407
HOW: Using collection classes to enumerate speech objects
The information in this article applies to:
- GrammarKit 5
- KinesicsKit 2
- LexiconKit 5
- ProfileKit 5
- SpeechKit 8
- VoiceMarkupKit 5
- VoiceXMLKit 2
Summary
Use for and foreach syntax to enumerate recognizers, synthesizers, profiles, recognized phrases, and other collections.
More Information
The following new collection classes are available for easy enumeration:
- BoneOrientationCollection
- ChantAlternateCollection
- ChantAlternateWordCollection
- ChantAudioCaptureDeviceCollection
- ChantAudioInDeviceCollection
- ChantAudioMixerCollection
- ChantAudioMixerLineCollection
- ChantAudioOutDeviceCollection
- ChantAudioRenderDeviceCollection
- ChantDictationSourceCollection
- ChantDictationTopicCollection
- ChantLexiconShortcutCollection
- ChantLexiconWordPronunciationCollection
- ChantPhrasePropertyCollection
- ChantRuleCollection
- ChantSpeakerCollection
- ChantSpeakerPropertyCollection
- ChantSREngineCollection
- ChantTTSEngineCollection
- ChantWordAlternateCollection
- ChantWordCollection
- KinectSensorCollection
- KinectSensorSessionCollection
The following example illustrates enumerating speech engines and accessing their properties.
private Chant.SpeechKit.NChantTTS NChantTTS1; foreach (NChantTTSEngine chantTTSEngine in NChantTTS1.ChantTTSEngines) { // Access engine properties string engine = chantTTSEngine.Engine; }