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?

已提问 4 个月前201 查看次数
4 回答
0

Hi.

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

Best,

Didier

profile pictureAWS
专家
已回答 4 个月前
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

已回答 4 个月前
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
专家
已回答 4 个月前
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.

已回答 4 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则