Exemplo n.º 1
0
    public async void ChangeTTSLanguage(string language)
    {
        if (!TTSManager.IsBootedUp())
        {
            TTSManager.BootUpTTS();
        }
        else if (TTSManager.IsUttering())
        {
            TTSManager.StopSpeaking();
        }

        string locale = null;

        for (var i = 0; i < languagelocaledict.Length; i++)
        {
            if (languagelocaledict[i, 0] == language.ToLower())
            {
                locale = languagelocaledict[i, 1];
                break;
            }
        }

        if (locale == null)
        {
            return;
        }

        SetLocaleOnView(locale);
        SetLocalAvailabilityOnView(locale);
        BoundaryClass.PopulateScrollView(locale);
        TTSManager.SetLocale(locale);
    }
Exemplo n.º 2
0
    public void ChangeSpeed()
    {
        if (!TTSManager.IsBootedUp())
        {
            TTSManager.BootUpTTS();
        }

        TTSManager.SetSpeechRate(BoundaryClass.ReturnBoundarySlider("speed").value);
    }
Exemplo n.º 3
0
    public void DownloadTTSData()
    {
        if (!TTSManager.IsBootedUp())
        {
            TTSManager.BootUpTTS();
        }

        TTSManager.DownloadTTSData();
    }
Exemplo n.º 4
0
    public void ChangePitch()
    {
        if (!TTSManager.IsBootedUp())
        {
            TTSManager.BootUpTTS();
            return;
        }

        TTSManager.SetPitch(BoundaryClass.ReturnBoundarySlider("pitch").value);
    }
Exemplo n.º 5
0
    async Task SpeakText()
    {
        if (!TTSManager.IsBootedUp())
        {
            TTSManager.BootUpTTS();
            return;
        }

        TTSManager.Speak(BoundaryClass.ReturnInputFieldComponent().text);
    }