Skip to content

Text-To-Speech unable to override system's default voices #26853

@yeelut

Description

@yeelut

Description

        private async Task PlayText()
        {
            var locales = await TextToSpeech.Default.GetLocalesAsync();
            var selectedLocale = locales.FirstOrDefault(locale => locale.Language == selectedLanguage && locale.Name == selectedVoice);
            Debug.WriteLine(selectedLocale.Name + ":" + selectedLocale.Language);
            SpeechOptions speechOptions = new SpeechOptions()         
            {
                Pitch = 1f,   // 0.0 - 2.0
                Volume = 0.75f, // 0.0 - 1.0
                Locale = selectedLocale
                    
            };
            await TextToSpeech.Default.SpeakAsync("Hello! I am "+selectedVoice + ". This is a Test! Ceci est un test! ¡Esto es una prueba!", speechOptions);
        }

I have tried different Voices for varies languages across different platforms.
But it only uses the system's default Voice for each languages.

Steps to Reproduce

No response

Link to public reproduction project repository

https://github.com/yeelut/MauiTTSSettings

Version with bug

9.0.21 SR2.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

macOS, iOS, Android, Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions