Expo Voice Recognition

Viewed 3399

I've been trying to implement Voice recognition on my Expo app, I've tried using a speech-to-text library called react-native-voice but it does not support Expo. Does anyone know any other library that I can use. I have read some articles on using Google's api but it is too complex for me and I prefer an easier alternative which can support Expo.

4 Answers

Expo SDK42 actually allows us to use the react-native-voice plugin, here is what i done

  • yarn add @react-native-voice/voice
  • modify your app.json with this "expo": { "plugins": [ [ "@react-native-voice/voice", { "microphonePermission": "Allow $(PRODUCT_NAME) to access your microphone", "speechRecogntionPermission": "Allow $(PRODUCT_NAME) to securely recognize user speech" } ] ] }

After that you can build your app with expo run and then use the react-native-voice plugin as normal

you can read more about that here

you can try react-native-speech-recognition from here it might work with Expo too

I am doing a project very similar to yours. There is NO Expo library for speech-to-text. Either eject from Expo into Bare React Native or deploy the Google Speech to Text API in the cloud (I used Heroku) and send your voice info as a POST request to it.

Related