Exemplo n.º 1
0
        void SendRequest()
        {
            string str = "";

            try
            {
                str = SoundRecognition.WavStreamToGoogle(_soundIO.OutputStream);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                _soundIO.OutputStream.Close();
                UpdateText(str);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }