DEV Community

MOHDSAMIR96
MOHDSAMIR96

Posted on

I want a solution about Speech to text recognition using react native. Anyone know about it then reply please!

My requirement is that apply this content on multiple button while clicking on it voice will be recognize and translate it also alert message sent me this is correct voice as your button text or not?

Top comments (3)

Collapse
 
debvortex profile image
Max Brauer • Edited

Hey there! There are basically 2 ways to go.

You could utilize the Web Speech API, which only works properly on chrome: wicg.github.io/speech-api/

The second way would be to record the speech, send it to a server (via an HTTP request or over a websocket), and send the result back. On the server you have a couple of options: use one of the services like Google Speech-To-Text, Microsoft Cognitive Services, IBM Watson, or Speechmatics. If you have privacy concerns using it, you could set up your own speech-to-text service. Once that is easy to use would be vosk alphacephei.com/en/

If you don't want to build a vosk server yourself: they also provide working docker images with a server (sounds like what you need?).

EDIT: Ah! Sorry, only now read that you want react native instead of react. The second part with a server stands. However, there are packages out there, that let you utilitze the native speech to text features of your android phone, like: github.com/react-native-voice/voice

Collapse
 
mohdsamir96 profile image
MOHDSAMIR96

i want solution for Android and ios using react native. You have any idea then send me as soon as possible.

Collapse
 
debvortex profile image
Max Brauer

But I had a link with a package for android in my previous comment?