Search code examples
androidinstallationtext-to-speech

Is the Google TTS Engine on all Android Phones, and where can I get it?


I'm trying to find out if the Google TTS Engine that came with my Android phone comes installed as factory default with all Android phones that support it? I'm not sure what kind of reference to look at to figure this out, so my plan is to go to Softbank, a retailer, and ask. I feel it's a question they won't be able to answer, though.

I've been told that Galaxies don't come with Google TTS, specifically; so, anyone with a Galaxy can at least set me straight on that....

I'm also wondering, how can I get a packaged version of the Google TTS Engine? I'm not able to find it on The Play Store. The best I could find was found by looking at the license (those sweet little things always have developer names and sites). So, it's the HTS engine, using HMM, right? But I'm not able to find a package for Android on their website. My next step there is to contact the developer, and I'm currently having my translated e-mail proof read (hopefully, I can find my own answer and post it up).

Any information would be greatly appreciated.


Solution

  • I don't think the accepted answer is really correct. This code doesn't check if the google TTS engine is installed. It just launch an intent that TTS engines in general respond to ask if the TTS data for them is installed.

    If there is no TTS engine installed, you may get an FC caused by an exception of the type ActivityNotFoundException. If you have other TTS engine (like pico) it will respond and check it's data. If you have more than one TTS engine, it will ask you which TTS engine you want the intent to work.

    You should check for the package name in the package manager instead. This code checks for SVOX Pico TTS:

    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        if(isPackageInstalled(getPackageManager(), "com.svox.pico")){
            ttsInstalled = true; // This would be good to have it as a static member
        }
    }
    
    
    public static boolean isPackageInstalled(PackageManager pm, String packageName) {
            try {
                pm.getPackageInfo(packageName, 0);
            } catch (NameNotFoundException e) {
                return false;
            }
            return true;
    }