void Start() { if (AndroidRuntimePermissions.CheckPermission("android.permission.RECORD_AUDIO") != AndroidRuntimePermissions.Permission.Granted) { AndroidRuntimePermissions.RequestPermission("android.permission.RECORD_AUDIO"); } if (AndroidRuntimePermissions.CheckPermission("android.permission.WRITE_EXTERNAL_STORAGE") != AndroidRuntimePermissions.Permission.Granted) { AndroidRuntimePermissions.RequestPermission("android.permission.WRITE_EXTERNAL_STORAGE"); } if (GameObject.FindGameObjectsWithTag("SceneThemeAudio").Length > 0) { sceneTheme = GameObject.FindGameObjectsWithTag("SceneThemeAudio")[0]; } Bihou = GameObject.FindGameObjectWithTag("Bihou"); dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); // set the calling package this is optional // you can use this if your app is for children or kids speechPlugin.SetCallingPackage("com.mycoolcompany.mygame"); AddSpeechPluginListener(); }
private void Awake() { #if UNITY_ANDROID if (Application.platform != RuntimePlatform.Android) { return; } dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); textToSpeechPlugin.OnInit += OnInit; textToSpeechPlugin.OnChangeLocale += OnSetLocale; textToSpeechPlugin.OnStartSpeech += OnStartSpeech; textToSpeechPlugin.OnEndSpeech += OnEndSpeech; textToSpeechPlugin.OnErrorSpeech += OnErrorSpeech; #endif }
// Use this for initialization void Start() { if (AndroidRuntimePermissions.CheckPermission("android.permission.RECORD_AUDIO") != AndroidRuntimePermissions.Permission.Granted) { AndroidRuntimePermissions.RequestPermission("android.permission.RECORD_AUDIO"); } if (AndroidRuntimePermissions.CheckPermission("android.permission.ACCESS_FINE_LOCATION") != AndroidRuntimePermissions.Permission.Granted) { AndroidRuntimePermissions.RequestPermission("android.permission.ACCESS_FINE_LOCATION"); } dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); // set the calling package this is optional // you can use this if your app is for children or kids speechPlugin.SetCallingPackage("com.mycoolcompany.mygame"); AddSpeechPluginListener(); }
// Use this for initialization void Start() { speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); AddSpeechPluginListener(); }
// Use this for initialization void Start() { speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.setSpeechEventListener(onReadyForSpeech, onBeginningOfSpeech, onEndOfSpeech, onError, onResults); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Init(); textToSpeechPlugin.SetTextToSpeechCallbackListener(OnInit, OnGetLocaleCountry, OnSetLocale, OnStartSpeech, OnDoneSpeech, OnErrorSpeech); }
private void Awake() { dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); }
// Use this for initialization void Start() { dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); AddSpeechPluginListener(); }
private void Awake() { speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); textToSpeechPlugin.OnInit += OnInit; textToSpeechPlugin.OnChangeLocale += OnSetLocale; textToSpeechPlugin.OnStartSpeech += OnStartSpeech; textToSpeechPlugin.OnEndSpeech += OnEndSpeech; textToSpeechPlugin.OnErrorSpeech += OnErrorSpeech; }
// Use this for initialization void Start() { speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.LoadLocaleCountry(); textToSpeechPlugin.LoadCountryISO2AlphaCountryName(); textToSpeechPlugin.Init(); textToSpeechPlugin.SetTextToSpeechCallbackListener(OnInit, OnGetLocaleCountry, OnSetLocale, OnStartSpeech, OnDoneSpeech, OnErrorSpeech); CheckTTSDataActivity(); }
private void Awake() { // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); //textToSpeechPlugin.OnInit += this.OnInit; //textToSpeechPlugin.OnEndSpeech += this.OnEndSpeech; }
// Use this for initialization void Start() { dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); // set the calling package this is optional // you can use this if your app is for children or kids speechPlugin.SetCallingPackage("com.mycoolcompany.mygame"); AddSpeechPluginListener(); }
private void Awake() { dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); textToSpeechPlugin.OnInit += OnInit; textToSpeechPlugin.OnChangeLocale += OnSetLocale; textToSpeechPlugin.OnStartSpeech += OnStartSpeech; textToSpeechPlugin.OnEndSpeech += OnEndSpeech; textToSpeechPlugin.OnErrorSpeech += OnErrorSpeech; }
void Start() { dispatcher = Dispatcher.GetInstance(); utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); AddSpeechPluginListener(); AddTextToSpeechListener(); apiaiClient = new ApiAiUnity(); apiaiClient.Initialize(new AIConfiguration("a984bc306ae24d11b4105e251f892a21", SupportedLanguage.English)); }