Sunday, March 24, 2013

[android-developers] Problems with TTS on Samsung Galaxy S3

I'am developing an app for android that uses TTS.

I've created a splash screen where i check if TTS engine is installed and in case that is not installed, it goes to Google Play to download it.

@Override  protected void onCreate(Bundle savedInstanceState) {      super.onCreate(savedInstanceState);  ...      Intent checkIntent = new Intent();      checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);      startActivityForResult(checkIntent, MY_DATA_CHECK_CODE);  ...  }  @Override  protected void onActivityResult(int requestCode, int resultCode, Intent data) {  ...      if (requestCode== PersonalTextToSpeech.MY_DATA_CHECK_CODE)  {      if (resultCode== TextToSpeech.Engine.CHECK_VOICE_DATA_PASS)      {          mTts = new TextToSpeech(context, this);      }else      {              Intent installIntent = new Intent();              installIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);              context.startActivity(installIntent);      }  }   }

It was working fine in Samsung devices with 2.2 and 2.3.x OS. It goes to Google Play if needed, but now I've tried with a Samsung Galaxy S3 (with 4.1.1), and it has 2 TTS installed by default (Samsung and Google), so i get a dialog asking to select one.

Select TTS

If the user selects Samsung it works perfect, but if the user selects Google, it goes to Settings --> Language and input --> Text-to-speech output --> Google Text-to-speech Engine --> Settings --> Install Voice Data and i get this: TTS Languages installed

So, I have 3 questions/problems:

1- Is there any way to force programatically to use Samsung TTS without asking?

2- My device is from Spain, but if i change the language to English, this one is not available in my Google list of TTS languages, and i can't find a way to add it (see screenshot #2).

3- If I change the language to spanish, this language is supposed to be installed in my device (see screenshot #2), but for some reason TTS resultCode is LANG_NOT_SUPPORTED (-2).

In fact, right now while i write this, I've just found something weird.


TTS Settings

If you choose Samsung, it will use Samsung TTS or Google TTS according to what you have selected in: Settings --> Language and input --> Text-to-speech output.

So, even if you select SamsungTTS, you could be using Google TTS, but if you select Google TTS directly (see Screenshot #1) it will fail.

Can someone explain me what I'm doing wrong?

Thanks for your help.

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment