private void Window_Loaded(object sender, RoutedEventArgs e) { //Start AISA Command Recognition try { AISAHandler.Initialize(() => { Speech.Activate(); AskSheet.Visibility = Visibility.Hidden; Spinner.Visibility = Visibility.Visible; Hypothesis.Visibility = Visibility.Visible; }, () => { Speech.Deactivate(); }, HandleResult); } catch (Exception) { } AISAHandler.Start(); //Set advanced result controllers ViewControllerConnector.Connect += ConnectionHandler; ViewControllerConnector.None += NoneHandler; ViewControllerConnector.ChangeHypothesis += ChangeHypothesisHandler; }
private void StartRecognition() { AudioHandler.Start(); Speech.Activate(); var rec = new Recognizer(() => { Speech.Deactivate(); }, HandleResult); }