When initializing the TTS engine, the default speech rate is
correctly read, but the TTS demonstration in the Settings
screen was overriding that value by setting the rate to
its fixed default value after the engine was initialized.
The fix consists in applying the default value after it has
been read from the settings (as is done for the language
for instance).
Change-Id: Ie13dfa3a2a7e59e5e120e74dc41e60afbedea821
}
mDefaultRatePref.setValue(String.valueOf(mDefaultRate));
mDefaultRatePref.setOnPreferenceChangeListener(this);
+ // apply the default rate so the TTS demo in the Settings screen uses it, even if
+ // the use of default settings is not enforced
+ mTts.setSpeechRate(mDefaultRate/100.0f);
// Default language / country / variant : these three values map to a single ListPref
// representing the matching Locale
mDefaultLocVariant = new String();
}
mTts.setLanguage(new Locale(mDefaultLanguage, mDefaultCountry, mDefaultLocVariant));
- mTts.setSpeechRate(mDefaultRate/100.0f);
initDefaultSettings();
updateWidgetState();
checkVoiceData();