简体   繁体   中英

TextToSpeech onInit() is getting called with ERROR status in Huawei P40 Lite

I am facing a weird issue in Huawei P40 Lite, when using TextToSpeech, that is onInit() getting called with TextToSpeech.ERROR status, instead of TextToSpeech.SUCCESS, specifically in Huawei P40 Lite, and thus leading to the error Speak Failed Not Bound to TTS Engine when calling tts.speak()

The above mentioned issue is only seen in a very few devices, like Huawei P40 Lite. In rest other devices, the same code is working fine, that is, onInit() is properly called with TextToSpeech.SUCCESS status.

Please help me out to understand, what may be the reason behind onInit() being failed.

You can go to Android settings > Accessibility > Speech synthesis to see if any TTS engine is available. For Chinese devices like Huawei and Meizu, it can be missing, so it should be installed separately. The easiest way to solve it is to go to the Google Play and install Google Text-to-Speech service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM