public void OnPartialResult(KASRRecognizer recognizer, KASRResult result) { // RPC 14Mar2018 #700 Support Silence detection if (fSpeechRecognitionRunning) { lastSpeechResult = DateTime.Now; } System.Diagnostics.Debug.WriteLine("ASR: Partial " + result.CleanText); }
public bool initialize(string bundlename) { try { bundlename = "keenB2sQT-nnet3chain-en-us"; List <string> assets = new List <string>(); assets.Add(bundlename + "/decode.conf"); assets.Add(bundlename + "/final.dubm"); assets.Add(bundlename + "/final.ie"); assets.Add(bundlename + "/final.mat"); assets.Add(bundlename + "/final.mdl"); assets.Add(bundlename + "/global_cmvn.stats"); assets.Add(bundlename + "/ivector_extractor.conf"); assets.Add(bundlename + "/mfcc.conf"); assets.Add(bundlename + "/online_cmvn.conf"); assets.Add(bundlename + "/splice.conf"); assets.Add(bundlename + "/splice_opts"); assets.Add(bundlename + "/wordBoundaries.int"); assets.Add(bundlename + "/words.txt"); assets.Add(bundlename + "/lang/lexicon.txt"); assets.Add(bundlename + "/lang/phones.txt"); assets.Add(bundlename + "/lang/tree"); string asrBundleRootPath = global::Android.App.Application.Context.ApplicationInfo.DataDir; string asrBundlePath = asrBundleRootPath + "/" + bundlename; KASRBundle asrBundle = new KASRBundle(global::Android.App.Application.Context); asrBundle.InstallASRBundle(assets, asrBundleRootPath); KASRRecognizer.SetLogLevel(KASRRecognizerLogLevel.KASRRecognizerLogLevelInfo); KASRRecognizer.InitWithASRBundleAtPath(asrBundlePath, global::Android.App.Application.Context); recognizer = KASRRecognizer.SharedInstance(); recognizer.AddListener(this); // KeenASR.Initialize(bundlename); if (recognizer == null) { return(false); } var test = recognizer.RecognizerState; System.Diagnostics.Debug.WriteLine("After Init, Recognizer state is " + test); //recognizer.Delegate = this; return(true); } catch (Exception ex) { return(false); } }
void RecognizerReadyToListenAfterInterrupt(KASRRecognizer recognizer) { int i = 0; }
public void OnFinalResult(KASRRecognizer recognizer, KASRResult result) { System.Diagnostics.Debug.WriteLine("Final result: " + result.CleanText); }
public void RecognizerFinalResult(KASRResult result, KASRRecognizer recognizer) { System.Diagnostics.Debug.WriteLine("Final"); }