コード例 #1
0
 public static void playVoice(string systemName, systemVoice.Tone tone, string msg)
 {
     systemVoice.Voice system = SystemVoice.applyVoiceTone(returnVoiceByName(systemName), tone);
     voice_AudioSource.loop = false;
     voice_AudioSource.volume = system.volume;
     voice_AudioSource.pitch = system.pitch;
     Speaker.Speak(msg, voice_AudioSource, Speaker.VoicesForCulture(system.culture.ToString())[system.cultureIndex]);
 }
コード例 #2
0
    private void onEnableTextToSpeech()
    {
        GameObject rtVoice = Instantiate(Resources.Load("rtVoice"), gameObject.transform.position, Quaternion.identity) as GameObject;

        rtVoice.transform.parent = gameObject.transform;
        rtVoice.tag = "rtVoices";
        SystemVoice = _SystemVoice;
    }
コード例 #3
0
 private void onEnableTextToSpeech()
 {
     GameObject rtVoice = Instantiate(Resources.Load("rtVoice"), gameObject.transform.position, Quaternion.identity) as GameObject;
     rtVoice.transform.parent = gameObject.transform;
     rtVoice.tag = "rtVoices";
     SystemVoice = _SystemVoice;
 }