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 }
//Initialization private void Awake() { BluetoothAdapter.enableBluetooth();//Force Enabling Bluetooth BluetoothAdapter.OnDevicePicked += HandleOnDevicePicked; BluetoothAdapter.OnClientRequest += HandleOnClientRequest; BluetoothAdapter.startServer(UUID, 1000); // Init server textToSpeechPlugin = TextToSpeechPlugin.GetInstance(); textToSpeechPlugin.SetDebug(0); textToSpeechPlugin.Initialize(); }
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; }
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; }
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)); }
// Use this for initialization void Start() { textToSpeechPlugin.Initialize(); Invoke("DelayStartTTSEngine", 1f); }