我在做语音识别的时候创建 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有问题?