예제 #1
0
            internal static void StartRecording(bool shouldCollectPartialResults)
            {
                var options = new SpeechRecognitionOptions();

                options.shouldCollectPartialResults = shouldCollectPartialResults;
                StartRecording(options);
            }
예제 #2
0
 private static void StartRecording(SpeechRecognitionOptions options)
 {
                 #if UNITY_IOS && !UNITY_EDITOR
     iOSSpeechRecognizer._StartRecording(options.shouldCollectPartialResults);
                 #elif UNITY_ANDROID && !UNITY_EDITOR
     AndroidSpeechRecognizer.StartRecording(options);
                 #endif
 }
예제 #3
0
            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);
            }
예제 #4
0
 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
 }