我试图用语音合成功能来实现一个通用的应用程序。我看了一下Microsoft文档,它说名字空间是System.Speech.Synthesis。但是,当我输入System.Speech.Synthesis时。它说演讲是不被认可的。我做错什么了?
发布于 2014-10-30 16:16:45
下面是一个有用的例子:
using System.Speech.Synthesis;
static void Main(string[] args)
{
...
// Speech helper
SpeechSynthesizer reader = new SpeechSynthesizer();
const string msg = "Hello";
Console.WriteLine(msg);
reader.SpeakAsync(msg);
}另外,请确保引用“System.Speech”:

发布于 2014-10-30 16:14:46
您需要将引用添加到项目中。引用,右键单击,在找到引用后添加引用。
如果这仍然不起作用,您需要右键单击变量上的.cs文件,然后解析为System.Speech。
https://stackoverflow.com/questions/26657940
复制相似问题