//------------------------------------------------------------------------- public void initSpeech(string app_id, _eSpeechLanguage speech_language) { #if UNITY_ANDROID mISpeech = new AndroidSpeech(app_id, speech_language); Debug.Log("AndroidSpeech::"); #elif UNITY_IOS mISpeech = new IOSSpeech(app_id, speech_language); Debug.Log("IOSSpeech::"); #else Debug.LogError("Do not supported on this platform. "); #endif }
//------------------------------------------------------------------------- //string mAppId; //_eSpeechLanguage mSpeechLanguage; //------------------------------------------------------------------------- public IOSSpeech(string app_id, _eSpeechLanguage speech_language) { //mAppId = app_id; //mSpeechLanguage = speech_language; }
//------------------------------------------------------------------------- public AndroidSpeech(string app_id, _eSpeechLanguage speech_language) { mAndroidJavaClassSpeech = new AndroidJavaClass("com.XFSpeech.XFSpeech.XFSpeech"); mAppId = app_id; mSpeechLanguage = speech_language; }