Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 298
piks Avatar asked Feb 11 '26 00:02

piks


2 Answers

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.

like image 80
Nikolay Elenkov Avatar answered Feb 12 '26 14:02

Nikolay Elenkov


You can't override device settings as far as TTS speed is concerned, which is ridiculous, Default 'normal' is rather too fast and 'slow' is too slow... if we had sliding adjustments, as in TTS apps, then there would be no problem.

like image 39
cay Avatar answered Feb 12 '26 15:02

cay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!