shell command to change a tts engine?
Moderator: Martin
shell command to change a tts engine?
Hi everyone~
could anyone tell me the shell command to change the default tts engine? I like to change it through "execute root command".
thanks a lot~
could anyone tell me the shell command to change the default tts engine? I like to change it through "execute root command".
thanks a lot~
Re: shell command to change a tts engine?
First you wanna set the default TTS engine to the ones you need, from the Settings - Text to Speech output at your phone. You need the value later. For example you use Ava and wanna change to Tom and vice versa.
You can change the default TTS using Action Set System Setting. Select Category Secure and find tts_default_locale. Press save and copy that element, so you have the first action to set it to Ava. Next, change the TTS setting again to the other voice that you want, example to Tom. Go back to automagic, open the second action, and tap the tts_default_locale again. You will see the value change to reflects Tom TTS. Save it and tap "This Usage" at the prompt.
Now you have two seperate actions to set your default TTS to Ava and Tom. Put it anywhere you need in the flow. Remember to check the "I have verified the setting" option to make it executeable.
If you still prefer to run in from execute root command, you can change the value of settings database. Use this command
For example, for Ava voices at my phone, it appears as "vocalizer_e2.tts:en_US_Ava". Find and copy this value using the Action Set System Setting above. Or since you have root, you can also use SQLite Editor to open Settings Storage - settings.db - secure - tts_default_locale.
So the command will be :
You can change the default TTS using Action Set System Setting. Select Category Secure and find tts_default_locale. Press save and copy that element, so you have the first action to set it to Ava. Next, change the TTS setting again to the other voice that you want, example to Tom. Go back to automagic, open the second action, and tap the tts_default_locale again. You will see the value change to reflects Tom TTS. Save it and tap "This Usage" at the prompt.
Now you have two seperate actions to set your default TTS to Ava and Tom. Put it anywhere you need in the flow. Remember to check the "I have verified the setting" option to make it executeable.
If you still prefer to run in from execute root command, you can change the value of settings database. Use this command
Code: Select all
settings put secure tts_default_locale {value of the TTS engine}
So the command will be :
Code: Select all
settings put secure tts_default_locale vocalizer_e2.tts:en_US_Ava
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: shell command to change a tts engine?
thanks for the reply.
Sorry to say that there is no "Settings - Text to Speech output", and I couldn't find the "Settings - Text to Speech output" from Set System Setting.
Is there another way?
Sorry to say that there is no "Settings - Text to Speech output", and I couldn't find the "Settings - Text to Speech output" from Set System Setting.
Is there another way?
Re: shell command to change a tts engine?
I am sorry if I am quite ambiguous. I mean the usual settings at your phone, not in automagic action.
Open settings at your phone, Language & Input - Text-to-speech output. The position might be different in some phones, you gotta to find it out.
Sometimes it is located at the accessibility or maybe in the more settings.
Or you can use automagic shortcut too. Use action Launch App, choose package name for Settings (com.android.settings) and for the class name, find "text", you should have the text-to-speech already, choose it.
Execute it, you will be landed directly at the TTS setting, to pick the default TTS engine.
Open settings at your phone, Language & Input - Text-to-speech output. The position might be different in some phones, you gotta to find it out.
Sometimes it is located at the accessibility or maybe in the more settings.
Or you can use automagic shortcut too. Use action Launch App, choose package name for Settings (com.android.settings) and for the class name, find "text", you should have the text-to-speech already, choose it.
Execute it, you will be landed directly at the TTS setting, to pick the default TTS engine.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: shell command to change a tts engine?
You explained to me very clearly .
Just it was said that tts is locked in my cellphone. I tried every step above.
And the launch "com.android.settings" ---- "com.android.setttings.tts.TextToSpeechSet" failed. I know there should be a window popup for me to choose tts engine. but there is not. sorry. In fact , after I execute the flow, the window seems flash a tiny little bit, then it returns to the automagic window(I run the flow manually).
Just it was said that tts is locked in my cellphone. I tried every step above.
And the launch "com.android.settings" ---- "com.android.setttings.tts.TextToSpeechSet" failed. I know there should be a window popup for me to choose tts engine. but there is not. sorry. In fact , after I execute the flow, the window seems flash a tiny little bit, then it returns to the automagic window(I run the flow manually).
Re: shell command to change a tts engine?
What phone do you have? I never see any reason TTS should be locked. If it is really locked out, probably it is set somewhere in the build.prop, using special parameter. That will be beyond the topic discussed in this forum.
You install 3rd party TTS to see if it can worked. I use vocalizer e2. But there are a lot of alternatives to try out.
You install 3rd party TTS to see if it can worked. I use vocalizer e2. But there are a lot of alternatives to try out.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: shell command to change a tts engine?
Maybe I didn't say it right, I mean the switch of default tts engine is locked. I installed another engine. It will be working good only in its own app. There is no way I can make that the default engine.
some days before, google tts engine was working on my phone. after I accidentally uninstall it, it won't work even if I reinstall it. so weird.
some days before, google tts engine was working on my phone. after I accidentally uninstall it, it won't work even if I reinstall it. so weird.
Re: shell command to change a tts engine?
If you check the database secure tts_default_locale, what is the value? After you install new TTS engine, do this value change?
If you use action Speech Output, what are the choices of voice to choose from? If you only need to use the engine, there is no need to make it default TTS.
I use various of language with Speech Output and no need to change the default one.
If you use action Speech Output, what are the choices of voice to choose from? If you only need to use the engine, there is no need to make it default TTS.
I use various of language with Speech Output and no need to change the default one.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: shell command to change a tts engine?
I want to change default engine because there is no MY lanuage in current list of speech out. How should I check the database you mentioned?
the only tts engine left is PICO tts which is the system default one.
the only tts engine left is PICO tts which is the system default one.
Last edited by liloli on 01 Aug 2017 22:42, edited 1 time in total.
Re: shell command to change a tts engine?
I just tried init system setting variable, I got null.
Last edited by liloli on 01 Aug 2017 22:41, edited 1 time in total.