I have created an application which allows the user to find the nearest hotels. Now the user is able to give the voice and able to see the result. But the local names like “cochin” or “Chennai” are not in the result if the user speaks those names. But the names like “London”, “New York” or “Mumbai” are able to view. The code which I am using given below.
private void startVoiceRecognitionActivity() {
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speak Now");
startActivityForResult(intent, REQUEST_CODE);
}
This is a limitation of the speech engine. It’s the same in all locations – well-known places (larger towns and cities) work fine, but the dictionaries Google uses just don’t seem to include the names of smaller places.
I don’t think there’s anything you can do to resolve this. It’s up to Google to improve their speech recognition.