Voice: Offline Recognition

Created on 6 Aug 2019  路  8Comments  路  Source: react-native-voice/voice

How do I enable to use offline speech recognition?

thankful

All 8 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inglesuniversal picture inglesuniversal  路  8Comments

Anandks1993 picture Anandks1993  路  5Comments

B4ckes picture B4ckes  路  5Comments

under94 picture under94  路  7Comments

dohvis picture dohvis  路  7Comments