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(); }
// 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() { dispatcher = Dispatcher.GetInstance(); // for accessing audio utilsPlugin = UtilsPlugin.GetInstance(); utilsPlugin.SetDebug(0); speechPlugin = SpeechPlugin.GetInstance(); speechPlugin.SetDebug(0); speechPlugin.Init(); AddSpeechPluginListener(); }
// 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(); }
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)); }