Пример #1
0
    private void OnInit(int status)
    {
        Debug.Log("[TextToSpeechDemo] OnInit status: " + status);

        if (status == 1)
        {
            UpdateStatus("init speech service successful!");
            hasInit = true;

            //get available locale on android device
            textToSpeechPlugin.GetAvailableLocale();

            UpdateLocale(SpeechLocale.US);
            UpdatePitch(1f);
            UpdateSpeechRate(1f);

            CancelInvoke("WaitingMode");
            Invoke("WaitingMode", waitingInterval);
        }
        else
        {
            UpdateStatus("init speech service failed!");

            CancelInvoke("WaitingMode");
            Invoke("WaitingMode", waitingInterval);
        }
    }