Also i have got a new project, where nedded make a voice recognition (speech-to-text) , but i have’t find a worked library in react-native. How can i connect scripts in python to react native project?
I only find how to make autorizathion in python, but by me it was maked in JS
2
Answers
If your python app is going to be running on a separate machine to the react-native app (so it is running on a server). I would write a small server implementation ontop of the python app using something like flask which sends back a JSON then you can follow the tutorial here: https://reactnative.dev/docs/network Which talks about making http requests and parsing the response. So in a REST api manner
If you are talking about client side python running in tandem with react-native on a mobile device. That would be pretty difficult to accomplish as in production the react compile is compiling into native code by handling JavaScript/JSX and not python. Someone may have an answer on this last part
You can embed Python into React-Native, but it’s really tricky. I suggest you go with the other answer using Server-Client Architecture.
However if you really have no other choice.