Test voice activity: Improve debugging display
This commit is contained in:
parent
2b09922276
commit
983813a105
1 changed files with 5 additions and 5 deletions
|
@ -175,7 +175,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
|||
speechAllowed = true;
|
||||
switch (mTts.isLanguageAvailable(new Locale(language))) {
|
||||
case TextToSpeech.LANG_MISSING_DATA:
|
||||
ttsVoiceName = "setLanguage: LANG_MISSING_DATA";
|
||||
ttsVoiceName = language + ": LANG_MISSING_DATA";
|
||||
if (isSettingsActivity(act)) {
|
||||
AlertDialog.Builder builder = createAlertDialog(
|
||||
R.string.tts_missing_language_data_title,
|
||||
|
@ -189,11 +189,11 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
|||
// Proceed anyway in this case, look like breaking here caused Issue #3344
|
||||
//break;
|
||||
case TextToSpeech.LANG_AVAILABLE:
|
||||
ttsVoiceName = "".equals(ttsVoiceName) ? "setLanguage: LANG_AVAILABLE" : ttsVoiceName;
|
||||
ttsVoiceName = "".equals(ttsVoiceName) ? language + ": LANG_AVAILABLE" : ttsVoiceName;
|
||||
case TextToSpeech.LANG_COUNTRY_AVAILABLE:
|
||||
ttsVoiceName = "".equals(ttsVoiceName) ? "setLanguage: LANG_COUNTRY_AVAILABLE" : ttsVoiceName;
|
||||
ttsVoiceName = "".equals(ttsVoiceName) ? language + ": LANG_COUNTRY_AVAILABLE" : ttsVoiceName;
|
||||
case TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE:
|
||||
ttsVoiceName = "".equals(ttsVoiceName) ? "setLanguage: LANG_COUNTRY_VAR_AVAILABLE" : ttsVoiceName;
|
||||
ttsVoiceName = "".equals(ttsVoiceName) ? language + ": LANG_COUNTRY_VAR_AVAILABLE" : ttsVoiceName;
|
||||
mTts.setLanguage(new Locale(language));
|
||||
if (android.os.Build.VERSION.SDK_INT >= 21) {
|
||||
if (mTts.getVoice() != null) {
|
||||
|
@ -208,7 +208,7 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
|
|||
break;
|
||||
case TextToSpeech.LANG_NOT_SUPPORTED:
|
||||
//maybe weird, but I didn't want to introduce parameter in around 5 methods just to do this if condition
|
||||
ttsVoiceName = "setLanguage: LANG_NOT_SUPPORTED";
|
||||
ttsVoiceName = language + ": LANG_NOT_SUPPORTED";
|
||||
if (isSettingsActivity(act)) {
|
||||
AlertDialog.Builder builder = createAlertDialog(
|
||||
R.string.tts_language_not_supported_title,
|
||||
|
|
Loading…
Reference in a new issue