我需要开发一个简单的64位C ++文本到语音(TTS)程序,以便在Windows 7和Vista上运行。我的第一步是尝试从SAPI 5.4教程编译程序。但我在Windows 7机器上找不到所需的SAPI 5.4软件包。我搜索了互联网,只有SAPI 5.1适用于Windows XP Microsoft Speech Technology page声称“用于编程Windows 7中包含的语音引擎的本机代码API。”SAPI 5.4 tutorial具有以下说明:
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.
…
我的Windows 7 PC上不存在上述说明中的2个文件夹。我安装了Windows SDK for Windows 7 and .NET Framework 4,但这两个文件夹仍然不存在。
我应该怎样做才能在我的Windows 7机器上安装SAPI 5.4并编译上述教程中的程序?
非常感谢你的帮助!
大卫
答案 0 :(得分:5)
Microsoft Speech SDK 5.4或SAPI 5.4包含在“Windows SDK for Windows 7和.NET Frameword 4”包中。它可以从Microsoft下载中心下载。安装包后,包含文件位于“c:\ Program Files \ Microsoft SDKs \ Windows \ v7.1 \ include”中,库文件位于“c:\ Program Files \ Microsoft SDKs \ Windows \ v7.1 \” LIB \ 64" 。编译程序时无需指定这两个位置。 Microsoft的SAPI 5.4教程和一些相关文档已经过时。