/// <summary> /// Gets the recognition result. /// </summary> /// <since_tizen> 3 </since_tizen> /// <privilege> /// http://tizen.org/privilege/recorder /// </privilege> /// <privlevel> /// public /// </privlevel> /// <feature> /// http://tizen.org/feature/speech.control /// http://tizen.org/feature/microphone /// </feature> /// <exception cref="InvalidOperationException">This exception can be due to an invalid state.</exception> /// <exception cref="ArgumentException">This exception can be due to an invalid parameter.</exception> /// <exception cref="NotSupportedException">This exception can be due to not supported.</exception> /// <returns>The recognition result if possible, else a null object.</returns> /// <pre> /// The state must be ready. /// </pre> public static RecognitionResult GetResult() { s_recognitionResult = null; s_resultCb = (ResultEvent evt, IntPtr cmdList, IntPtr result, IntPtr userData) => { s_recognitionResult = new RecognitionResult(evt, cmdList, result); }; ErrorCode error = VcGetResult(s_resultCb, IntPtr.Zero); if (error != ErrorCode.None) { Log.Error(LogTag, "GetResult Failed with error " + error); throw ExceptionFactory.CreateException(error); } return(s_recognitionResult); }
internal static extern ErrorCode VcSetResultCb(VcResultCb callback, IntPtr userData);