コード例 #1
0
        // Update is called once per frame
        //private void Update()
        //{

        //}


        //Initialize Text To Speech
        //Note: The result is returned to the status callback.
        public void InitializeTextToSpeech()
        {
#if UNITY_EDITOR
            Debug.Log("InitTextToSpeech");
#elif UNITY_ANDROID
            AndroidPlugin.InitTextToSpeech(gameObject.name, "ReceiveStatus"); //Get a initialization status
#endif
        }
コード例 #2
0
    public float speakSpeedStep = 0.25f;    //Text reading speed step



    // Use this for initialization
    private void Start()
    {
        if (receiveObject == null)
        {
            receiveObject = this.gameObject;
        }

#if UNITY_EDITOR
        Debug.Log("InitSpeechRecognizer");
#elif UNITY_ANDROID
        AndroidPlugin.InitTextToSpeech(receiveObject.name, "OnStatus"); //Check the initialize status
#endif
    }
コード例 #3
0
    public float speakSpeedStep = 0.25f;    //テキスト読み上げ速度変化量



    // Use this for initialization
    private void Start()
    {
        if (receiveObject == null)
        {
            receiveObject = this.gameObject;
        }

#if UNITY_EDITOR
        Debug.Log("InitTextToSpeech");
#elif UNITY_ANDROID
        AndroidPlugin.InitTextToSpeech(receiveObject.name, "OnStatus"); //起動ステータスの表示
#endif
    }
コード例 #4
0
        // Update is called once per frame
        //private void Update()
        //{

        //}


        //Initialize Text To Speech
        //Note: The result is returned to the status callback.
        public void InitializeTextToSpeech()
        {
            ResetInitializeStatus();
#if UNITY_EDITOR
            Debug.Log("InitTextToSpeech");
#elif UNITY_ANDROID
            if (string.IsNullOrEmpty(locale))
            {
                AndroidPlugin.InitTextToSpeech(gameObject.name, "ReceiveStatus"); //Get a initialization status
            }
            else
            {
                AndroidPlugin.InitTextToSpeech(locale, gameObject.name, "ReceiveStatus"); //Get a initialization status
            }
#endif
        }