Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

open through intent settings window Google TTS

Tags:

java

android

Is it possible with the help of intent to open the settings window speech synthesizer google, namely, the choice of male or female voices "English (UK)"? image settings TTS

I need to get it right in the settings select the voice for the UK, but not in the general settings TTS Pro com.android.settings.TTS_SETTINGS I know I do not fit.

At the moment I have the following code:

<Preference
                android:summary="@string/pref_gender_voice_summary"
                android:title="@string/pref_gender_voice_title">
                <intent android:action="com.android.settings.TTS_SETTINGS"></intent>
            </Preference>

Forgive me for using Google translator

like image 933
Максим Фомичёв Avatar asked Oct 14 '25 04:10

Максим Фомичёв


2 Answers

It is not possible to choose a male or female voice from the system settings. Voices in the TTS engine are named with roman numerals: Voice I, Voice II, ...

Open voice settings by referencing its package name and action "install tts data".

// launch voice settings
Intent intent = new Intent();
intent.setPackage("com.google.android.tts");
intent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
like image 154
apsommer Avatar answered Oct 16 '25 16:10

apsommer


Yes.

    Intent intent = new Intent();

    intent.setAction("com.android.settings.TTS_SETTINGS");
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

    startActivity(intent);
like image 30
Kris Krause Avatar answered Oct 16 '25 16:10

Kris Krause