Determining when to use managed SAPI or COM SAPI

Last reviewed: 9/1/2014

HOW Article ID: H091401

The information in this article applies to:

  • GrammarKit 5
  • SpeechKit 8
  • VoiceMarkupKit 5


.NET applications can access SAPI recognizers and synthesizers via managed SAPI or COM SAPI APIs. The APIs are different and managed SAPI offers only a subset of the full COM SAPI capabilities.

GrammarKit 5, SpeechKit 8, and VoiceMarkupKit 5 include .NET classes that provide a common interface for applications to use either managed SAPI libraries: System.Speech and Microsoft.Speech or the full COM SAPI.

Managed SAPI limits applications to SAPI-only speech technology and other .NET managed SAPI limitations. However, it does eliminate the need to deploy the Chant interop COM library that interfaces with COM SAPI and other speech APIs.

The best way to determine which SAPI is best for an application is to review which features are available that address application requirements.

More Information

The following table identifies the differences between managed SAPI and COM SAPI to determine which is best on the basis of application requirements.

FeatureManaged SAPICOM SAPI
Audio ManagementNone. Uses default audio devices.Allows application to set specific audio devices for recognition and synthesis playback.
Grammar SyntaxW3C XMLSAPI 5 XML and W3C XML
Profile ManagementSpeaker settings are adjusted via control panel.Allows application to enumerate, set, and update speaker profile and properties.
PhonemesMicrosoft Universal Phone Set (UPS)IPA
Rule ManagementNone since there is no SAPI XML grammar support.Allows application to enumerate, enable, and disable SAPI 5 XML grammar rules.
User InterfaceAudio Setup, Microphone, and Speaker Training dialogs launch via control panel.Allows application to launch dialogs.
Word CorrectionNone.Allows application to commit alternate recognition results.

The NChant classes in the new managed SAPI assemblies are the same as their COM SAPI counterparts.

Chant ProductChant Managed SAPI AssemblyChant COM SAPI Assembly

There are new Chant Developer Workbench application view assemblies that use the new managed SAPI assemblies. The file name is the same as their COM SAPI counterparts so they are installed in the product NET\libv4 folder. To design and test managed SAPI grammars and text-to-speech markup, copy the managed SAPI framework libraries to the Developer Workbench runtime folder.

  • Rename:
    • C:\Program Files\Chant\GrammarKit 5\Win32\NET\libv4\Chant.Developer Workbench.ApplicationView.GrammarKit.dll to Chant.Developer Workbench.ApplicationView.GrammarKit.bak,
    • C:\Program Files\Chant\SpeechKit 8\Win32\NET\libv4\Chant.Developer Workbench.ApplicationView.SpeechKit.dll to Chant.Developer Workbench.ApplicationView.SpeechKit.bak, and
    • C:\Program Files\Chant\VoiceMarkupKit 5\Win32\NET\libv4\Chant.Developer Workbench.ApplicationView.VoiceMarkupKit.dll to Chant.Developer Workbench.ApplicationView.VoiceMarkupKit.bak.
  • Copy:
    • C:\Program Files\Chant\GrammarKit 5\Win32\NET\libv4\Chant.Developer Workbench.ApplicationView.GrammarKit.dll,
    • C:\Program Files\Chant\SpeechKit 8\Win32\NET\libv4\Chant.Developer Workbench.ApplicationView.SpeechKit.dll, and
    • C:\Program Files\Chant\VoiceMarkupKit 5\Win32\NET\libv4\Chant.Developer Workbench.ApplicationView.VoiceMarkupKit.dll
    to C:\Program Files\Chant\Developer Workbench 2014\Win32.