2

I am trying to develop an application with some commands & user inputs. Now Google provided extra parameter EXTRA_PREFER_OFFLINE for API 23+ to use speech recognition always in offline mode.

I have check several answers and there is no specification how to use EXTRA_PREFER_OFFLINE constant below API 23.

1 Answers1

3

Yes - check out this post about how to configure the device correctly.

EXTRA_PREFER_OFFLINE is only a string constant, which Google 'Now' accepts on any device above 4.1. Just use the string itself instead android.speech.extra.PREFER_OFFLINE

Community
  • 1
  • 1
brandall
  • 6,094
  • 4
  • 49
  • 103
  • used string `android.speech.extra.PREFER_OFFLINE` and all the steps which allow offline recognition. – Gaurav Vachhani Sep 16 '16 at 07:46
  • @GauravVachhani Have you tried setting your device Locale to English UK, installed the English UK offline files, reboot your device - then try in aeroplane mode? Sometimes that triggers the offline to work for other languages. If still no luck, what error number is the `RecognitionListener` throwing? – brandall Sep 16 '16 at 07:50