-
Notifications
You must be signed in to change notification settings - Fork 14
3. Localisations
Vikram Ezhil edited this page Apr 12, 2020
·
3 revisions
Droid Speech 2.0 supports speech recognition for different localisations. The listener method onDksLanguagesAvailable
will provide the device supported languages details.
An example on setting preferred language is given below,
override fun onDksLanguagesAvailable(defaultLanguage: String?, supportedLanguages: ArrayList<String>?) {
if (supportedLanguages != null && supportedLanguages.contains("ta-IN")) {
// Setting the speech recognition language to tamil if found
dks.currentSpeechLanguage = "ta-IN"
}
}