Amazon Transcribe on React Native

0

I've been trying to use the Amazon Transcribe on streaming on React Native to do real-time caption but I had problems doing it. Using Amplify, I can´t do it because it asks me for the bytes of the audio as input, but I'm having dificulties founding a library on React Native that works to do it. In the documentation, it is not specified how this bytes have to be provided. I tried Amplify on Amazon Translate, for example, and it worked, so I think the problem is about how i'm using Amplify.

I also tried to import @aws-amplify but there was errors about packages.

I also tried to this manually by signing the request by my self, but it is complex e and I have no idea where my error is.

What is the best way to implement it?

Pedro
asked 2 months ago130 views
1 Answer
0
  • Use the StartStreamTranscription API to open a bidirectional stream between your React Native app and Amazon Transcribe. You would send audio chunks to Transcribe and receive transcription results in real-time.
  • In your app code, call the StartStreamTranscription API asynchronously using the Amplify library. Send audio data captured from the device microphone to the stream.
  • Set up event handlers to receive the transcription results from Transcribe. Display the partial and final results in your React Native UI as they arrive.
  • Configure options like language, encoding etc. as needed for your use case. You can also enable features like speaker identification and filtering.
  • Make sure to close the stream properly once transcription is complete to avoid leaks.
profile picture
EXPERT
answered 2 months ago
  • Thanks for your anwser!

    I think my problem is about getting the audio chunks. Every package to do it is React Native that I tried failed. What should I do?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions