Bug report best practices: Submitting Issues
Failed to initialize Text to Speech engine. Exception.
Unable to reproduce this locally.
Can you provide a simple reproducible solution for us?
Additionally, where are you calling the code?
Hey guys, here is a reproducible solution.
https://github.com/Sergiojoel9877/XE.git
It uses the latest Xamarin Essentials nugget, XamarinForms 3.4.0, and the latest Android Support Libraries 28.0.0.0-preview8
@jamesmontemagno no matter the place [Code Behind, ViewModel], it always gives me that exception.
I believe your issue is that you are trying to call the speak code on a background task:
Task.Factory.StartNew(async ()=>
{
It has to be initialized on the UI thread. Remove this code and should be good.
This is not a supported scenario because TTS must be initialized and run on the UI Thread.
You can use:
SpeakAsync().ContinueWith((t)=>{});
Just after updating to the 1.0.0 version it got solved. Thanks guys.