question

6666666 avatar image
0 Votes"
6666666 asked LeonLu-MSFT edited

How to use xamarin.essentials speech in where google is blocked?

In xamarin.forms I can not use speechText .

I am blocked to google and can not open google how to use speechText?

dotnet-xamarinforms
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LeonLu-MSFT avatar image
0 Votes"
LeonLu-MSFT answered LeonLu-MSFT edited

Hello,​

Welcome to our Microsoft Q&A platform!

TextToSpeech class enables an application to utilize the built-in text-to-speech engines to speak back text from the device.

If you do not use the Google play services, it will use built-in text-to-speech engines to speak it, I test with Huawei android device with await TextToSpeech.SpeakAsync("Hello World"); it worked as normal.


If you device is not support this function, you will get Unable to start text-to-speech engine, not supported on device. PlatformNotSupportedException, here is TextToSpeech's source code.

https://github.com/xamarin/Essentials/blob/main/Xamarin.Essentials/TextToSpeech/TextToSpeech.android.cs


Best Regards,

Leon Lu



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 16
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I run the code and there is an error 'Failed to initialize Text to Speech engine

0 Votes 0 ·

Which device that you use?

0 Votes 0 ·

Do you make your device connect to the internet?

0 Votes 0 ·

I am using android emulator Huawei P30 Pro and can connect to the internet. but it failed to initialize.

0 Votes 0 ·
Show more comments