Amplify Speech to Text

0

Hi All,

I am trying to use Amplify Prediction transcription option to convert a WAV file to text. I have a File Object and I converted it to ArrayBuffer and passed it to the below code as source.

Predictions.convert({
          transcription: {
            source: {
              buffer,
            },
            language: "en-US",
          }
        })

But it says invalid source. I tried to use AudioBuffer as well and getting same error. I even used Int8Array and other options but still getting invalid source error. Please let me know how to pass the File object to transcribe?

asked 3 months ago172 views
4 Answers
0

Hi.

Text to speech has to be done with Amazon Transcribe not Amplify: https://aws.amazon.com/pm/transcribe/

Best,

Didier

profile pictureAWS
EXPERT
answered 3 months ago
0

I am using Amplify for some other purpose, but Amplify also allows Transcribe via Predictions https://docs.amplify.aws/react/build-a-backend/more-features/predictions/transcribe-audio/ Just wanted to know how to do this in the above service

answered 3 months ago
0

Check out my blog which leverage Amplify predictions (Polly) and GitHub repo.

https://levelup.gitconnected.com/build-your-personal-speaker-assistant-with-amplify-and-chatgpt-8b6433fea042

I think the source fir prediction could be as simple as a plain string

profile picture
EXPERT
answered 3 months ago
0

Thanks for the link. But your code uses text to speech. I need speech to text. In the doc they said the input should be PCM Audio byte buffer. But it is not accepting that or any other type.

answered 3 months ago

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