我在做语音识别的时候创建 SpSharedRecoContextClass 时报错:
未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 Speech.exe 中。
其他信息: HRESULT 中的异常:0x8004503A。
代码:
public SpeechLib.SpVoiceClass spvc = null;
public SpeechLib.SpSharedRecoContextClass ssrc = null;
public SpeechLib.ISpeechRecoGrammar isrg; public Form1()
{
this.spvc = new SpeechLib.SpVoiceClass();
//try
//{
this.ssrc = new SpeechLib.SpSharedRecoContextClass();
this.isrg = ssrc.CreateGrammar(1);
this.ssrc.Recognition +=new _ISpeechRecoContextEvents_RecognitionEventHandler(ssrc_Recognition);
//}
//catch(Exception ex)
//{
// MessageBox.Show(this,ex.Message);
//}
InitializeComponent();
}
请高手帮帮忙,我在VB里面做的时候报自动化错误!在C#里面如上,谢谢帮忙,
我的系统是Window Server 2003 做Text To Speech时正常~~
是不是我的SAPI有问题?
未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 Speech.exe 中。
其他信息: HRESULT 中的异常:0x8004503A。
代码:
public SpeechLib.SpVoiceClass spvc = null;
public SpeechLib.SpSharedRecoContextClass ssrc = null;
public SpeechLib.ISpeechRecoGrammar isrg; public Form1()
{
this.spvc = new SpeechLib.SpVoiceClass();
//try
//{
this.ssrc = new SpeechLib.SpSharedRecoContextClass();
this.isrg = ssrc.CreateGrammar(1);
this.ssrc.Recognition +=new _ISpeechRecoContextEvents_RecognitionEventHandler(ssrc_Recognition);
//}
//catch(Exception ex)
//{
// MessageBox.Show(this,ex.Message);
//}
InitializeComponent();
}
请高手帮帮忙,我在VB里面做的时候报自动化错误!在C#里面如上,谢谢帮忙,
我的系统是Window Server 2003 做Text To Speech时正常~~
是不是我的SAPI有问题?
解决方案 »
- C# winform postgresql数据库备份问题??
- 请教一个有关c#调用c++ dll 函数接口的问题
- C#关于WINFORM中返回值的问题!!急!!!!
- ComboBox如何绑定数据库中的文本和编号的字段啊
- 处理字符串的技巧问题!!!
- 一个数字字符串,如何在水晶报表里生成条码?希望帮忙
- 求一段delphi代码转C#代码,急用,可人民币支付,谢谢
- 网站的统计 找个实例看看啊!!!!!!!!!!!!!!!!!
- 关于用用word显示数据库数据
- 立即给分:如何给WinForm的按钮添加图标(C#)
- 关于网站登录的一些问题(2)谁能解决都行
- 请问一下如何用C#实现通过猫向服务器拨号登陆的功能,并判断是否能连通服务器?
http://www.codeproject.com/useritems/CSharpSAPIExperiment.asp
this.ssrc = new SpeechLib.SpSharedRecoContextClass();
HRESULT 中的异常:0x8004503A。
must download the new Speech SDK 5.1 for it!!! Thanks!