//Decrease utterance pitch of Text To Speech
    public void SpeakPitchDown()
    {
#if UNITY_EDITOR
        Debug.Log("SpeakPitchDown called");
#elif UNITY_ANDROID
        SetPitchText(AndroidPlugin.AddTextToSpeechPitch(-speakPicthStep));
#endif
    }
Beispiel #2
0
    IEnumerator TalkEvent(string talkText, float talkSpeed, float talkPich, float talkvalue, bool isShowToast)
    {
        callSE.Play();
        yield return(new WaitForSeconds(0.1f));

#if UNITY_ANDROID
        AndroidPlugin.AddTextToSpeechSpeed(talkSpeed);
        AndroidPlugin.AddTextToSpeechPitch(talkPich - 1);
        float m_voiceVolue;
        mixer.GetFloat("Voice", out m_voiceVolue);
        AndroidPlugin.AddTextToSpeechPitch(m_voiceVolue * talkvalue);
        AndroidPlugin.StartTextToSpeech(talkText, gameObject.name, "OnStatus", "OnStart", "OnDone", "OnStop");
        if (isShowToast)
        {
            AndroidPlugin.ShowToast(talkText);
        }
#endif
    }