mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 22:07:12 +00:00
TextToSpeech: test and fix onIsValidVoiceName
This commit is contained in:
@@ -217,7 +217,12 @@ public class TtsService extends TextToSpeechService {
|
||||
|
||||
@Override
|
||||
public int onIsValidVoiceName(String name) {
|
||||
return super.onIsValidVoiceName(name);
|
||||
for (Voice voice : mAvailableVoices) {
|
||||
if (voice.name.equals(name)) {
|
||||
return TextToSpeech.SUCCESS;
|
||||
}
|
||||
}
|
||||
return TextToSpeech.ERROR;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user