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.
Expo Voice Recognition
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
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. –
Hylo
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.
If you are using Expo, now you can use a module called Speech for voice recognition. Docs are here https://docs.expo.dev/versions/latest/sdk/speech/
This module is for Text To Speech but we need Speech To Text in this topic –
Splendent
© 2022 - 2024 — McMap. All rights reserved.