我正在使用Visual Studio 2010运行Windows 7 Professional 64位。
我已经安装了Microsoft语音平台 - Server Runtime v10.2和en-US语言包。
我使用Microsoft.Speech创建了一个Web服务(Web应用程序)。在我的测试中,Web Service接收一个字符串并根据一些语法规则模拟识别。
当我使用ASP.NET开发服务器在Visual Studio中运行它时,它可以正常工作而没有问题。
然后我转到IIs并创建一个指向它的虚拟目录。当我尝试调用web方法时,我收到此错误:
System.PlatformNotSupportedException: Speech Recognition is not available on this system. SAPI and Speech Recognition engines cannot be found.
at Microsoft.Speech.Internal.SapiInterop.SapiRecognizer..ctor(RecognizerType type)
at Microsoft.Speech.Recognition.SpeechRecognitionEngine.Initialize(RecognizerInfo recognizerInfo)
at Microsoft.Speech.Recognition.SpeechRecognitionEngine..ctor(CultureInfo culture)
at VoiceCommand.SimulateVoiceCommand(String command) in c:\Development\Visual Studio 2010\VoiceCommandWebService\VoiceCommandWS\App_Code\VoiceCommand.cs:line 35
我不知道因为我在同一台机器上运行它有什么区别。这可能是权限问题吗?
答案 0 :(得分:2)
我从微软论坛得到了一些反馈。
使用 Microsoft语音平台 - 服务器运行时时,它将在Windows 7等开发客户端操作系统中正常运行,但要在生产环境中运行,则需要在Windows Server操作系统中运行。
我在Windows Server 2008中测试了相同的Web服务,但它运行良好。