我正在尝试重现基本的 TTS 示例
http://msdn.microsoft.com/en-us/library/windows/apps/jj207057(v=vs.105).aspx
当我输入时:
using Windows.Phone.Speech.Synthesis.SpeechSynthesizer;
“语音”命名空间不可用。我收到以下错误:
The type or namespace name 'Speech' does not exist in the namespace 'Windows.Phone' (are you missing an assembly reference?)
这是我的引用文件夹:
有什么想法可能是错误的吗?
最佳答案
您的项目是 Windows Phone 8.1 RT,而不是 Silverlight。 命名空间 Windows.Phone 仅在基于 Silverlight 的应用程序中可用。
您可以查看this链接。
如果您想要创建基于 Silverlight 的应用程序,则必须创建一个名称末尾带有“(Windows Phone Silverlight)”的新项目,然后尝试创建您的应用程序。
关于c# - 命名空间 Windows.Phone.Speech 不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25448749/