2

i want to create an application that is speech-enabled but whenever i get to MS website to download SAPI, i get an error.

I want to know where I can get SAPI.

and I also would like to know if a SAPI 5.3 application can work on Windows 2000, Windows XP and Windows Vista (if coded with C++/MFC).

also, what is the best way to use SAPI ? with C# .NET or C++/MFC ?

Thanks.

4

3 回答 3

4

Microsoft Speech SDK可在此处下载。

选择 C# 还是 C++ 取决于您自己的喜好。使用 .NET 时,您会在 .NET 中找到与语音识别和合成相关的所有内容System.Speech。将此程序集的引用添加到您的项目中,您将能够直接使用语音 API。以下是演示文本到语音功能的简单示例程序:

using System.Speech.Synthesis;

class Program
{
    static void Main(string[] args)
    {
        SpeechSynthesizer synth = new SpeechSynthesizer();
        synth.Rate = -1;
        synth.Volume = 100;

        synth.SelectVoice("Microsoft Sam");

        synth.Speak("Hello World");
    }
}
于 2009-04-16T13:03:24.950 回答
2

我认为您不能只从微软网站下载 Speech SDK 5.3。您可以从http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en下载包含 SAPI 5.3的 windows 平台 SDK 。

于 2009-04-21T19:38:27.693 回答
0

好吧,你从 MS 那里得到了 SAPI。如果他们的服务有问题,那么您在下载时遇到了问题!

我将 SAPI 与 C 一起使用,所以我无法评论 C#/C++。

也是几年前的事了,所以我不知道我使用的是哪个版本 - 但它在 w2k、FWIW 上运行良好。

于 2009-04-16T13:03:12.157 回答