I've read a lot about the speech recognizer from android for my own app. When using the recognition with connection to the internet everything is working fine for all languages. But I'm not able to realize the offline recognition. Every time I try the recognition with disabled internet I only get the hint that Google isn't reachable at the moment.
Can someone please help me with this problem? I'm using a Nexus 5 with Android 5.1 for developing.
I'm using this code:
Intent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
i.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
i.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.GERMAN.toString());
try {
startActivityForResult(i, REQUEST_OK);
} catch (Exception e) {
Toast.makeText(getApplicationContext(), "Error initializing speech to text engine.", Toast.LENGTH_LONG).show();
}
Which minimum android version do I need to select to enable offline recognition? Do I need any special rights for android when using the recognition offline?
Would be fine if anyone is having a solution for me.
Edit: And once again me. Seems like the mentioned hack is not working that perfect. After installing any app from the playstore the recognition isn't working again. Also repeating the (un-)installing hasn't solved the problem. Has anyone out there found another workaround or solution for this problem on Android 5/5.1 smartphones? I would be really glad about a solution to this problem!