Example #1
0
    //////////////////////////////////////////////////////////////////////////

    void TTS_Speak(string text, bool allowVoiceOver = true)
    {
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
        if (UAP_AccessibilityManager.UseWindowsTTS())
        {
            //Debug.Log("Speaking: " + text);
            WindowsTTS.Speak(text);
        }
#elif (UNITY_STANDALONE_OSX || UNITY_EDITOR) && !UNITY_WEBPLAYER
        if (UAP_AccessibilityManager.UseMacOSTTS())
        {
            //Debug.Log("Speaking: " + text);
            MacOSTTS.instance.Speak(text);
        }
#elif UNITY_ANDROID
        if (UAP_AccessibilityManager.UseAndroidTTS())
        {
            m_TTS_SpeakingTimer += (text.Length * 3.0f / 16.0f);
            AndroidTTS.SetSpeechRate(m_SpeechRate);
            AndroidTTS.Speak(text);
        }
#elif UNITY_IOS
        if (UAP_AccessibilityManager.UseiOSTTS())
        {
            m_TTS_SpeakingTimer += (text.Length * 3.0f / 16.0f);
            iOSTTS.StartSpeaking(text, allowVoiceOver && UAP_AccessibilityManager.IsVoiceOverAllowed(), m_SpeechRate);
        }
#endif
    }
Example #2
0
 public void TryTelePorting()
 {
     tts.Speak("Try teleporting between the demarkated Circles using the trigger on your  right controller. ");
 }