c# - Programming with speech recognition of microsoft. How could I close the speech recognition engine each time when it got a word -


I am programming using Microsoft's speech recognition I run an example and it works very well . But if I open speech recognition, the program will always be in. Every time when the engine recognizes the words, it prevents it, is it possible?

My code is a bit like this:

  _trainer = new speech speech recognition engine (); _trainer.LoadGrammar (new grammar (new grammar builder (word)); // Load a word _trainer. Speech Recognized + = _trainer_SpeechRecognized; _trainer.SpeechRecognitionRejected + = _trainer_SpeechRecognitionRejected; _trainer.SetInputToDefaultAudioDevice (); // Set the input on the default audio device _trainer. Identify Sink (Recognize mode.Single);   

Thank you for your help.

I tried to call _trainer.Dispose () but in the end, it will not work on the engine and gives me a break. SpeechRecognitionEngine

Identify P>

  _trainer.RecognizeCompleted + = _trainer_RecognizeCompleted;  _trainer_RecognizeCompleted   
  inside _trainer.RecognizeAsyncStop ()   

; To cancel SpeechRecognitionEngine manually

,

  _trainer.RecognizeAsyncCancel ();  Recognize again    

  _trainer to resume  SpeechRecognitionEngine . RecognizeAsync (RecognizeMode.Single);   

See MSDN samples

1-) 2-)

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -