internal static void StartRecording(bool shouldCollectPartialResults) { var options = new SpeechRecognitionOptions(); options.shouldCollectPartialResults = shouldCollectPartialResults; StartRecording(options); }
private static void StartRecording(SpeechRecognitionOptions options) { #if UNITY_IOS && !UNITY_EDITOR iOSSpeechRecognizer._StartRecording(options.shouldCollectPartialResults); #elif UNITY_ANDROID && !UNITY_EDITOR AndroidSpeechRecognizer.StartRecording(options); #endif }
private static AndroidJavaObject CreateJavaRecognitionOptionsFrom(SpeechRecognitionOptions options) { var javaOptions = new AndroidJavaObject("kokosoft.unity.speechrecognition.SpeechRecognitionOptions"); javaOptions.Set <bool>("shouldCollectPartialResults", options.shouldCollectPartialResults); javaOptions.Set <string>("languageID", DETECTION_LANGUAGE); return(javaOptions); }
internal static void StartRecording(SpeechRecognitionOptions options) { GetAndroidBridge().CallStatic("StartRecording", CreateJavaRecognitionOptionsFrom(options)); }
private static void StartRecording(SpeechRecognitionOptions options) { #if UNITY_ANDROID && !UNITY_EDITOR AndroidSpeechRecognizer.StartRecording(options); #endif }