Search code examples
androidtext-to-speech

Can we override Device's TTS engine settings programmatically?


I have to override text-to-speech settings of the device programmatically in android, how to do so?

Complete use case is: My application is setting the app language based on the user's input i.e: if user selects French as language then App will display all text and announce text in french only.BUT problem is in device's TTS engine setting You can override application settings using option "Always use my settings" check box, so is there any way to check or uncheck the checkbox programmatically through my application, so what i need to do from app is when app is going to announce the text , before announcing it will uncheck the check box and then announce it and again will chek the checkbox back.

By the way I am developing app using android 2.1 version and using Samsung Galaxy tab.

Please provide some way to achieve it.

Regards, Piks


Solution

  • You don't have to change system settings, you just need to call setLanguage() and maybe setEngineByPackageName() on your TTS instance. Generally, you can't change system settings from an app, that goes for TTS as well.