mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-01 05:46:19 +00:00
Make mAvailableVoices final to avoid a lint warning on synchronized calls.
This commit is contained in:
@@ -67,7 +67,7 @@ public class TtsService extends TextToSpeechService {
|
||||
private SpeechSynthesis mEngine;
|
||||
private SynthesisCallback mCallback;
|
||||
|
||||
private Map<String, Voice> mAvailableVoices;
|
||||
private final Map<String, Voice> mAvailableVoices = new HashMap<String, Voice>();
|
||||
private Voice mMatchingVoice = null;
|
||||
|
||||
private BroadcastReceiver mOnLanguagesDownloaded = null;
|
||||
@@ -100,7 +100,6 @@ public class TtsService extends TextToSpeechService {
|
||||
}
|
||||
|
||||
mEngine = new SpeechSynthesis(this, mSynthCallback);
|
||||
mAvailableVoices = new HashMap<String, Voice>();
|
||||
for (Voice voice : mEngine.getAvailableVoices()) {
|
||||
mAvailableVoices.put(voice.name, voice);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user