Sample Engines (SAPI 5.3)
Sample text-to-speech (TTS) engines are provided to demonstrate the design, compilation, installation, and testing of engines.
Installing TTS EnginesThere are two ways to install the engines: command line and compiler.
Command Line InstallationAlthough applicable to different engines, this demonstration uses the sample ttseng.dll. You will need to register the engine with the operating system. At the command line type:
regsvr32 ttseng.dll mkvoice wordlist.txt voiceFile voicename
The second command registers the accompanying voice file samplevoice. The voice must be compiled in the same directory as the sample engine. From the SAPI5SDK directory:
The SDK tool MkVoice creates this voice file (these are also called voice fonts) and it is documented separately. Speech SDK 5.0 provides the sample file samplevoice although you may create your own by following the MkVoice directions.
Copy bin\mkvoice.exe samples\CPP\Engines\TTS\MkVoice cd samples\cpp\engines\tts\mkvoice mkvoice wordlist.txt samplevoice.vce samplevoice
Compiler InstallationEngines will automatically be registered after compiling if you use the SDK's project workspace. Installation occurs as part of the post-build commands. Likewise, the associated voice fonts will also be registered at the same time. To verify installation, you may examine the registry at:
If successfully loaded, you will see an entry with the file name such as SampleVoice. Please note it is important that you do not manually change or edit any of these registry entries. Only SAPI may modify speech registries and improperly changed ones could irrevocably damage the system. This is provided only for verification reasons.
Setting a Default EngineOnce installed, you can set the TTS engine as the default engine.
- In Control Panel, double-click the Speech icon.
- On the Text-to-Speech tab, from the list box, select the engine you want. In this case, select the Sample TTS Voice.
- A green check mark will appear in the check box, indicating that the Sample TTS Voice has been selected as the voice for the default engine.