Force app to use google speech synthesis

I have built an app that uses Text-To-Speech. When I install it on a phone, it will automatically download the google output speech synthesis voices. But in some phones it doesn't. How can I force on ALL phones to download it? Thanks.

Upvotes: 2

Views: 1127

Answers (1)

Kae10
Kae10

Reputation: 669

Try this constructor:

TextToSpeech tts = new TextToSpeech(context, TextToSpeech.OnInitListener, "com.google.android.tts");

It will be applied over API 14.

You can force to use specific tts engine by input engine's package name at last parameter of TextToSpeech constructor.

And, package name of Google TTS is "com.google.android.tts".

Also, if you want to use another engine for force the app, you can find package names of installed tts engine in your device with this method: TextToSpeech.getEngines();

It will be returned a list of EngineInfo instance about tts engines in device.

Upvotes: 4

Related Questions