我需要开发一个简单的 64 位 C++ 文本转语音 (TTS) 程序以在 Windows 7 和 Vista 上运行。我的第一步是尝试从 SAPI 5.4 教程编译程序。但我在我的 Windows 7 机器上找不到所需的 SAPI 5.4 包。我在 Internet 上搜索,只有 SAPI 5.1 可用于 Windows XP。
微软语音技术页面声称“用于对 Windows 7 中包含的语音引擎进行编程的本机代码 API”。SAPI 5.4 教程有以下说明 :
Step 1. Setting up the Project:
…
Code Listing 1
Next add the paths to SAPI.h and SAPI.lib files. The paths shown are for a
standard SAPI SDK install. If the compiler is unable to locate either file,
or if a nonstandard install was performed, use the new path to the files.
Change the project settings to reflect the paths. Using the Project->Settings.
menu item, set the SAPI.h path. Click the C/C++ tab and select Preprocessor
from the Category drop-down list. Enter the following in the "Additional
include directories": C:\Program Files\Microsoft Speech SDK 5.4\Include.
To set the SAPI.lib path:
1. Select the Link tab from the Same Settings dialog box.
2. Choose Input from the Category drop-down list.
3. Add the following path to the "Additional library path":
C:\Program Files\Microsoft Speech SDK 5.4\Lib\i386.
4. Also add "sapi.lib" to the "Object/library modules" line. Be sure that the
name is separated by a space.
…
上述说明中的 2 个文件夹在我的 Windows 7 PC 上不存在。我为 Windows 7 和 .NET Framework 4 安装了 Windows SDK,但这两个文件夹仍然不存在。
我应该怎么做才能在我的 Windows 7 机器上安装 SAPI 5.4 并编译上述教程中的程序?
非常感谢您的帮助!
大卫