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
已提問 2 個月前檢視次數 142 次
1 個回答
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
專家
已回答 2 個月前
  • 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?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南