android - What is the name of GoogleTTSService in JellyBean 4.3? -


in android versions prior 4.3, name of google's text-to-speech service, belonging package android.tts.ttsservice, googlettsservice.

thus, if inspect list of running services in devices running android 4.2 or lower, find com.google.android.tts.googlettsservice among them.

but in android 4.3 seems have changed and, among many services listed in running device, can no longer find corresponding service name.

what new name? part of different service?

update: appears package name service has been renamed android.tts.ttsservice in 2.x android.speech.tts.texttospeech in 4.3. that's step in right direction actual name of google's engine still missing.

any idea?

you can discover package tts engine in following way:

texttospeech tts = new texttospeech(context, oninitlistener); 

then in oninit listener:

        @override         public void oninit(final int status) {              switch (status) {              case texttospeech.success:                  try {                      final string initengine = tts.getdefaultengine();      // output engine log if it's != null                  } catch (final exception e) {                  }          break;     } } 

from experience, engine can return null or crash when it's called after oninit, surrounding try/catch block recommended. happening ivona , svox tts engines, of course user have 1 of default.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -