How do I determine when to use managed SAPI or COM SAPI with CDW 2014 applications?
Last reviewed: 9/1/2014
HOW Article ID: H091401
The information in this article applies to:
- GrammarKit 5
- SpeechKit 8
- VoiceMarkupKit 5
Summary
.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.
Feature | Managed SAPI | COM SAPI |
---|---|---|
Audio Management | None. Uses default audio devices. | Allows application to set specific audio devices for recognition and synthesis playback. |
Grammar Syntax | W3C XML | SAPI 5 XML and W3C XML |
Profile Management | Speaker settings are adjusted via control panel. | Allows application to enumerate, set, and update speaker profile and properties. |
Phonemes | Microsoft Universal Phone Set (UPS) | IPA |
Rule Management | None since there is no SAPI XML grammar support. | Allows application to enumerate, enable, and disable SAPI 5 XML grammar rules. |
TTS Markup | W3C SSML | SAPI 5 SSML and W3C SSML |
User Interface | Audio Setup, Microphone, and Speaker Training dialogs launch via control panel. | Allows application to launch dialogs. |
Word Correction | None. | 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 Product | Chant Managed SAPI Assembly | Chant COM SAPI Assembly |
---|---|---|
All | Chant.Shared.Managed.dll | Chant.Shared.dll |
GrammarKit | Chant.GrammarKit.Managed.dll | Chant.GrammarKit.dll |
SpeechKit | Chant.SpeechKit.Managed.dll | Chant.SpeechKit.dll |
VoiceMarkupKit | Chant.VoiceMarkupKit.Managed.dll | Chant.VoiceMarkupKit.dll |
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
-
Rename:
- C:\Program Files\Chant\GrammarKit 5\Win64\NET\libv4\Chant.Developer Workbench.ApplicationView.GrammarKit.dll to Chant.Developer Workbench.ApplicationView.GrammarKit.bak,
- C:\Program Files\Chant\SpeechKit 8\Win64\NET\libv4\Chant.Developer Workbench.ApplicationView.SpeechKit.dll to Chant.Developer Workbench.ApplicationView.SpeechKit.bak, and
- C:\Program Files\Chant\VoiceMarkupKit 5\Win64\NET\libv4\Chant.Developer Workbench.ApplicationView.VoiceMarkupKit.dll to Chant.Developer Workbench.ApplicationView.VoiceMarkupKit.bak.
-
Copy:
- C:\Program Files\Chant\GrammarKit 5\Win64\NET\libv4\Chant.Developer Workbench.ApplicationView.GrammarKit.dll,
- C:\Program Files\Chant\SpeechKit 7\Win64\NET\libv4\Chant.Developer Workbench.ApplicationView.SpeechKit.dll, and
- C:\Program Files\Chant\VoiceMarkupKit 8\Win64\NET\libv4\Chant.Developer Workbench.ApplicationView.VoiceMarkupKit.dll