mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Improve the log message for skipping asia/fa-en-us.
This commit is contained in:
@@ -135,18 +135,17 @@ public class SpeechSynthesis {
|
||||
final int gender = Integer.parseInt(results[i + 2]);
|
||||
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 {
|
||||
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();
|
||||
if (language.equals("")) {
|
||||
throw new IllegalArgumentException("Language '" + locale.getLanguage() + "' not supported.");
|
||||
|
||||
Reference in New Issue
Block a user