void OnApplicationPause(bool val) { if (speechPlugin != null) { if (val) { RemoveSpeechPluginListener(); } else { AddSpeechPluginListener(); } } if (textToSpeechPlugin != null && textToSpeechPlugin.isInitialized()) { if (val) { textToSpeechPlugin.UnRegisterBroadcastEvent(); } else { textToSpeechPlugin.RegisterBroadcastEvent(); } } }
private void OnApplicationPause(bool val) { //for text to speech events if (textToSpeechPlugin != null) { if (textToSpeechPlugin.isInitialized()) { if (val) { textToSpeechPlugin.UnRegisterBroadcastEvent(); } else { textToSpeechPlugin.RegisterBroadcastEvent(); } } } }
private void Talk(string _sting) { string utteranceId = "test-utteranceId"; if (textToSpeechPlugin.isInitialized()) { // un mute volume utilsPlugin.UnMuteBeep(); textToSpeechPlugin.SpeakOut(_sting, utteranceId); } }