Reputation: 101
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.
Upvotes: 8
Views: 12726
Reputation: 1
There's this react-native library react-native-voice that handles speech-to-text. I am doing the same project as you, I used it and it works after going through myriad debuggings. It works for me with the API 30, make sure to check 'Virtual microphone uses host audio input' in the microphone tab on your emulator device, to enable your computer audio. For more details, see the package repo enter link description here, the issue enter link description here, and the implementation exampleenter link description here
To walk you through, see the youtube tutorial https://www.youtube.com/channel/UCHau-Of64A57oL3EipcMpSA
Upvotes: 0
Reputation: 91
Expo SDK42 actually allows us to use the react-native-voice
plugin,
here is what i done
"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
Upvotes: 7
Reputation: 1
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.
Upvotes: 0
Reputation: 1
you can try react-native-speech-recognition from here it might work with Expo too
Upvotes: 0