Browse Source

Improve the log message for skipping asia/fa-en-us.

master
Reece H. Dunn 9 years ago
parent
commit
865ebf61a7
1 changed files with 10 additions and 11 deletions
  1. 10
    11
      android/src/com/reecedunn/espeak/SpeechSynthesis.java

+ 10
- 11
android/src/com/reecedunn/espeak/SpeechSynthesis.java View File

final int gender = Integer.parseInt(results[i + 2]); final int gender = Integer.parseInt(results[i + 2]);
final int age = Integer.parseInt(results[i + 3]); final int age = Integer.parseInt(results[i + 3]);


final Locale locale;
if (identifier.equals("asia/fa-en-us")) {
locale = null;
} else {
locale = getLocaleFromLanguageName(name);
}
if (locale == null) {
Log.d(TAG, "getAvailableResources: skipping " + name + " => locale not supported");
continue;
}

try { try {
final Locale locale;
if (identifier.equals("asia/fa-en-us")) {
throw new IllegalArgumentException("Voice '" + identifier + "' is a duplicate voice.");
} else {
locale = getLocaleFromLanguageName(name);
if (locale == null) {
throw new IllegalArgumentException("Locale not supported.");
}
}

String language = locale.getISO3Language(); String language = locale.getISO3Language();
if (language.equals("")) { if (language.equals("")) {
throw new IllegalArgumentException("Language '" + locale.getLanguage() + "' not supported."); throw new IllegalArgumentException("Language '" + locale.getLanguage() + "' not supported.");

Loading…
Cancel
Save