voice
voice copied to clipboard
Offline Recognition
How do I enable to use offline speech recognition?
thankful
You have to edit VoiceModule.java (inside the library) inside startListening() method, above speech.startListening(intent); adding this line:
intent.putExtra(RecognizerIntent.EXTRA_PREFER_OFFLINE,true);
Does anyone have a nice fork where all the extra android configuration can be applied?
@blackcoudpm Did you solved your problem?
@erksch On Android you need to install Google, Assistant and Voice search. In Assistant settings you can setup offline speech recognition and download many languages! There is no need to add an intent.
I added the offline (and others) extra to the modules java code, but would be nice if all extras could be passed from the outside
As shown: https://developer.apple.com/documentation/speech/sfspeechrecognitionrequest/3152603-requiresondevicerecognition?language=objc
It is possible to use offline speech recognition, now, in ios but I don't know how to configure the module to use offline recognition.
How do I use offline speech recognition on IOS? Thanks.
Can anyone help here? Unable to get this to work for anything other than english language
Tienes que editar VoiceModule.java (dentro de la biblioteca) dentro del método startListening (), arriba
speech.startListening(intent);agregando esta línea:intent.putExtra(RecognizerIntent.EXTRA_PREFER_OFFLINE,true);
I used it like this, it is in the file node_modules/react-native-voice/src/main/java/com/wenkesj/voice/VoiceModule.java but apparently you also need to add or download languages offline in your smartphone settings