How do I set SAPI default properties?

Last reviewed: 9/10/2008

HOW Article ID: H090808

The information in this article applies to:

  • SpeechKit 6
Summary

SAPI Recognizer and synthesizer properties can be set as system-wide default values via the SAPI console programs or programmatically. These properties can also be set on the instance of the recognizer or synthesizer at runtime for specific application needs.

With SpeechKit 6, unique property identifiers are defined to distinguish programmatic setting of system-wide and instance-based SAPI 5 default properties.

More Information

CSPDefaultEngine and CSPDefaultSpeaker are new in SpeechKit 6 to set the property values as the system-wide default for the recognizer or synthesizer. CSPEngine and CSPSpeaker set the property values only for the instance of the recognizer or synthesizer.

In SpeechKit 6, CSPSpeaker only sets the speaker active on an instance of ChantSR object and active for the instance of the speech engine and not as the system default speaker. To so this, you would need to use the CSPDefaultSpeaker property

If you are using CSPSpeaker with SpeechKit 5, then you need to determine if you need to change it to CSPDefaultSpeaker. If you only set the speaker to be able to recognize, then no change is necessary. If you launch the speaker training dialog, then you need to change the property to use CSPDefaultSpeaker with SpeechKit 6.

SAPI 5 relies on system-wide defaults when executing dialogs and control panel functions.

Setting the SAPI system-wide defaults are illustrated in the following examples:


ChantSR.SetStringProperty(CSPDefaultSpeaker, "MySpeakerProfile")
ChantTTS.SetDefaultEngine(CSPDefaultEngine, "Microsoft Mike")