private void InitVoice() { ssrContex = new SpSharedRecoContextClass(); isrg = ssrContex.CreateGrammar(1); SpeechLib._ISpeechRecoContextEvents_RecognitionEventHandler recHandle = new _ISpeechRecoContextEvents_RecognitionEventHandler(ContexRecognition); ssrContex.Recognition += recHandle; }
private SoundHelper() { ssrContex = new SpSharedRecoContextClass(); isrg = ssrContex.CreateGrammar(1); SpeechLib._ISpeechRecoContextEvents_RecognitionEventHandler recHandle = new _ISpeechRecoContextEvents_RecognitionEventHandler(ContexRecognition); ssrContex.Recognition += recHandle; }