void audioRecorder_BufferReady(object sender, AudioDataEventArgs e) { int registerResult = 0; try { registerResult = speechRecognizer.RegisterAudioBytes(e.Data); } catch (Exception ex) { Debug.WriteLine(ex.Message); StopNativeRecorder(); StopSpeechRecognizerProcessing(); StateMessageBlock.Text = "all stoped because of error"; } // incoming raw sound //Debug.WriteLine("{0} bytes of raw audio recieved, {1} frames processed at PocketSphinx", e.Data.Length, registerResult); }
void audioRecorder_BufferReady(object sender, AudioDataEventArgs e) { int registerResult = 0; try { registerResult = speechRecognizer.RegisterAudioBytes(e.Data); } catch (Exception ex) { Debug.WriteLine(ex.Message); StopNativeRecorder(); StopSpeechRecognizerProcessing(); StateMessageBlock.Text = "all stoped because of error"; } }