首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >语音识别在此系统上不可用。找不到SAPI和语音识别引擎

语音识别在此系统上不可用。找不到SAPI和语音识别引擎
EN

Stack Overflow用户
提问于 2014-06-27 12:48:54
回答 2查看 2.2K关注 0票数 2

日安!我尝试使用speech SDK 11编写简单的Speech to text引擎,所以尝试从这个例子执行测试。

所以,我只需要创建控制台应用程序并运行代码。(带任务)

代码语言:javascript
复制
 Task speechRecognizer = new Task(DoWork);
        speechRecognizer.Start();
        speechRecognizer.Wait();

static void DoWork()
    {

        // Create a new SpeechRecognitionEngine instance.
        SpeechRecognitionEngine sre = new SpeechRecognitionEngine();

        // Configure the input to the recognizer.
        sre.SetInputToWaveFile(@"c:\Test\Colors.wav");

        // Create a simple grammar that recognizes "red", "green", or "blue".
        Choices colors = new Choices();
        colors.Add(new string[] { "red", "green", "blue" });

        // Create a GrammarBuilder object and append the Choices object.
        GrammarBuilder gb = new GrammarBuilder();
        gb.Append(colors);

        // Create the Grammar instance and load it into the speech recognition engine.
        Grammar g = new Grammar(gb);
        sre.LoadGrammar(g);

        // Register a handler for the SpeechRecognized event.
        sre.SpeechRecognized +=
          new EventHandler<SpeechRecognizedEventArgs>(sre_SpeechRecognized);

        // Start recognition.
        sre.Recognize();
    }

但是我得到了一个例外:语音识别在这个系统上是不可用的。找不到SpeechSDK51和语音识别引擎。我尝试安装SAPI,但没有结果。

你能告诉我如何修复这个错误吗?

谢谢!

P.S.错误出现在:

代码语言:javascript
复制
 // Create a new SpeechRecognitionEngine instance.
    SpeechRecognitionEngine sre = new SpeechRecognitionEngine();
EN

回答 2

Stack Overflow用户

发布于 2014-11-05 21:19:33

您是否同时添加了运行时组件的x64和x86版本?这对我很管用。

票数 5
EN

Stack Overflow用户

发布于 2018-12-18 13:39:39

面临着同样的问题。未安装运行时。从microsoft official download page安装运行时解决了我的问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24444153

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档