多种形式的语音识别 [英] Voice Recognition in Multiple Form

查看:100
本文介绍了多种形式的语音识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在vb.net 2008 for XP中使用多种形式的speechrecognizer()语音识别。单个表单中的语音识别工作正常但是在我尝试更改表单时遇到多种形式我收到如下错误:



无法投射接口类型为System.Speech.Internal.SapiInterop.ISpRecognizer的类型为System.Speech.Internal.SapiInterop.SpSharedRecognizer的COM对象。此操作失败,因为对于具有IID{C2B5F241-DAA0-4507-9E16-5A1EAA2B7A5C}的接口的COM组件上的QueryInterface调用由于以下错误而失败:不支持此类接口(HRESULT异常:0x80004002(E_NOINTERFACE) ))。





提前感谢您对本主题的任何帮助......

How to use voice recognition using speechrecognizer() in multiple forms in vb.net 2008 for XP. Voice recognition in a single form is working properly but in case of multiple form when I am trying to change the form I am getting a error as follows:

Unable to cast COM object of type ''System.Speech.Internal.SapiInterop.SpSharedRecognizer'' to interface type ''System.Speech.Internal.SapiInterop.ISpRecognizer''. This operation failed because the QueryInterface call on the COM component for the interface with IID ''{C2B5F241-DAA0-4507-9E16-5A1EAA2B7A5C}'' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).


Thank you in advance regarding any help in this topic...

推荐答案

看起来你在一个表单中使用 System.Speech.Internal.SapiInterop.SpSharedRecognizer ,并且 System.Speech.Internal。另一种形式的SapiInterop.ISpRecognizer 。你为什么这样做?只需在所有表单中使用相同类型的识别器。
Looks like you use System.Speech.Internal.SapiInterop.SpSharedRecognizer in one form, and System.Speech.Internal.SapiInterop.ISpRecognizer in another form. Why do you do so? Just use the same type of recognizer in all your forms.


这篇关于多种形式的语音识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆