我需要开发一个简单的64位C++文本到语音(TTS)程序来在Windows7和Vista上运行。我的第一步是尝试从SAPI 5.4教程编译该程序。但我在Windows 7计算机上找不到所需的SAPI 5.4软件包。我在互联网上搜索了一下,只有SAPI 5.1可用于Windows XP。
Microsoft Speech Technology page声称“Windows7中包含的用于编程语音引擎的本地代码应用程序接口”。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上不存在。我安装了Windows SDK for Windows 7 and .NET Framework 4,但这两个文件夹仍然不在那里。
我应该怎么做才能在我的Windows7机器上安装SAPI 5.4并编译上面教程中的程序?
非常感谢您的帮助!
大卫
发布于 2013-10-01 21:58:06
微软Speech SDK5.4或SAPI5.4包含在"Windows SDK for Windows7 and .NET Frameword4“包中。它可以从Microsoft下载中心下载。安装软件包后,包含文件位于"c:\Program Files\Microsoft SDK\Windows\v7.1\ include“中,库文件位于"c:\Program Files\Microsoft SDK\Windows\v7.1\Lib\x64”中。在编译程序时不需要指定这两个位置。Microsoft的SAPI 5.4教程和一些相关文档已过期。
https://stackoverflow.com/questions/19070351
复制相似问题