/** * @method EventSpeechHypothesized * * Method that collects the event of hypothetical results of the recognition engine. * * @param {object} sender Object sent by the recognition event. * @paran {object} e Event with the result returned by the recognition engine. * @returns {void} */ private void EventSpeechHypothesized(object sender, SpeechHypothesizedEventArgs e) { CsResult result = new CsResult(); result.CreateHypothesized(e, Grammars); string data = JSON.Serialize(result.Result); EventDispatch(data, "vc:hypothesized"); }
/** * @method EventSpeechRecognized * * Method that collects the recognition event of the recognition engine. * * @param {object} sender Object sent by the recognition event. * @paran {object} e Event with the result returned by the recognition engine. * @returns {void} */ private void EventSpeechRecognized(object sender, SpeechRecognizedEventArgs e) { IsListen = false; CsResult result = new CsResult(); result.CreateRecognizer(e, Grammars); string data = JSON.Serialize(result.Result); EventDispatch(data, "vc:recognized"); }