Beispiel #1
0
 private void RunDiscernAsPath(string path, string type)
 {
     Task.Factory.StartNew(async() =>
     {
         AsrClient asrClient            = new AsrClient("3a1ec26757b94a84af648ac1f88cb95f");
         asrClient.ReturnPartialResult += (s) => //部份识别完成
         {
             this.Invoke(new Action(() =>
             {
                 this.rtBoxResult.Text = s;
             }));
         };
         asrClient.ReturnRecognitionResult += (s) => //全部识别完成
         {
             this.Invoke(new Action(() =>
             {
                 this.rtBoxResult.Text = s;
             }));
         };
         await asrClient.RunDiscernAsPath(path, type);
     });
 }
Beispiel #2
0
 private void RunDiscernAsPath(string path, string type)
 {
     Task.Factory.StartNew(async() =>
     {
         AsrClient asrClient            = new AsrClient("0549ec95cfb14f9f911562949117c4e3");
         asrClient.ReturnPartialResult += (s) => //部份识别完成
         {
             this.Invoke(new Action(() =>
             {
                 this.rtBoxResult.Text = s;
             }));
         };
         asrClient.ReturnRecognitionResult += (s) => //全部识别完成
         {
             this.Invoke(new Action(() =>
             {
                 this.rtBoxResult.Text = s;
             }));
         };
         await asrClient.RunDiscernAsPath(path, type);
     });
 }