Sample Engines (SAPI 5.4)
Microsoft Speech API 5.4
Sample text-to-speech (TTS) engines are provided to demonstrate the design, compilation, installation, and testing of engines.
Installing TTS Engines
There are two ways to install the engines: command line and compiler.
Command Line Installation
Although 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:
Copy bin\mkvoice.exe samples\CPP\Engines\TTS\MkVoice cd samples\cpp\engines\tts\mkvoice mkvoice wordlist.txt samplevoice.vce samplevoice
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.
Engines 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 Engine
Once 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.
All speech applications will now use this voice. As a confirmation of the selection, you will hear the voice speak, "You have selected the Sample TTS voice as the computer's default voice."
Confirming the Default Engine
To test the TTS, select any application that uses a voice. SDK provides a convenient application--TTSApp.exe.