public void runList()
        {



            iSpeechRecognizer iSpeech = new iSpeechRecognizer(_api, _production);

            iSpeech.setFreeForm(iSpeechRecognizer.FREEFORM_DISABLED);

            String[] names = new String[] { "jane", "bob", "john" };
            iSpeech.addAlias("NAMES", names);
            iSpeech.addCommand("call %NAMES%");

            StreamingBuffer streaming = iSpeech.startStreamingRecognize("audio/x-wav", this);
            uploadFile(_listAudio, streaming);

            try
            {
                SpeechResult result = iSpeech.stopStreaming();
                Console.WriteLine("Text = " + result.Text + " Confidence = " + result.Confidence);
            }
            catch (Exception e)
            {
                Console.WriteLine("error " + e.ToString());
            }

            
        }
        public  void runFreeForm()
        {           

            iSpeechRecognizer iSpeech = new iSpeechRecognizer(_api, _production);
           
            iSpeech.setFreeForm(iSpeechRecognizer.FREEFORM_DICTATION);

           StreamingBuffer streaming =  iSpeech.startStreamingRecognize("audio/x-wav", this);

           uploadFile(_freeFormAudio, streaming);

           try
           {
               SpeechResult result = iSpeech.stopStreaming();
               Console.WriteLine("Text = " + result.Text + " Confidence = " + result.Confidence);
           }
           catch(Exception e)
           {
               Console.WriteLine("error " + e.ToString());
           }

            

           

        }
Exemple #3
0
        public void runFreeForm()
        {
            iSpeechRecognizer iSpeech = new iSpeechRecognizer(_api, _production);

            iSpeech.setFreeForm(iSpeechRecognizer.FREEFORM_DICTATION);

            StreamingBuffer streaming = iSpeech.startStreamingRecognize("audio/x-wav", this);

            uploadFile(_freeFormAudio, streaming);

            try
            {
                SpeechResult result = iSpeech.stopStreaming();
                Console.WriteLine("Text = " + result.Text + " Confidence = " + result.Confidence);
            }
            catch (Exception e)
            {
                Console.WriteLine("error " + e.ToString());
            }
        }
Exemple #4
0
        public void runList()
        {
            iSpeechRecognizer iSpeech = new iSpeechRecognizer(_api, _production);

            iSpeech.setFreeForm(iSpeechRecognizer.FREEFORM_DISABLED);

            String[] names = new String[] { "jane", "bob", "john" };
            iSpeech.addAlias("NAMES", names);
            iSpeech.addCommand("call %NAMES%");

            StreamingBuffer streaming = iSpeech.startStreamingRecognize("audio/x-wav", this);

            uploadFile(_listAudio, streaming);

            try
            {
                SpeechResult result = iSpeech.stopStreaming();
                Console.WriteLine("Text = " + result.Text + " Confidence = " + result.Confidence);
            }
            catch (Exception e)
            {
                Console.WriteLine("error " + e.ToString());
            }
        }