mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-08 07:32:32 +00:00
TtsService.java: also report TextToSpeech.LANG_MISSING_DATA if the base resources are not found or the data can be upgraded.
This commit is contained in:
@@ -114,15 +114,13 @@ public class TtsService extends TextToSpeechService {
|
||||
|
||||
@Override
|
||||
protected int onIsLanguageAvailable(String language, String country, String variant) {
|
||||
if (!mEngineInitialized) {
|
||||
Context context = getApplicationContext();
|
||||
if (!mEngineInitialized ||
|
||||
!CheckVoiceData.hasBaseResources(context) ||
|
||||
CheckVoiceData.canUpgradeResources(context)) {
|
||||
return TextToSpeech.LANG_MISSING_DATA;
|
||||
}
|
||||
|
||||
if (mAvailableVoices == null) {
|
||||
Log.e(TAG, "Attempted to check language availability before loading voices!");
|
||||
return TextToSpeech.LANG_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
final Locale query = new Locale(language, country, variant);
|
||||
|
||||
Voice languageVoice = null;
|
||||
|
||||
Reference in New Issue
Block a user