void SendRequest() { string str = ""; try { str = SoundRecognition.WavStreamToGoogle(_soundIO.OutputStream); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { _soundIO.OutputStream.Close(); UpdateText(str); } }
private void SendRequest() { string str = ""; try { str = SoundRecognition.WavStreamToGoogle(_soundIO.OutputStream); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { _soundIO.OutputStream.Close(); UpdateText(str); //thread to compare string Thread requestThread = new Thread(CompareString); requestThread.Start(str); } }