Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
Convert mp3 to PCM

I try to use aws amplify predictions.

The example is on this site on the end:

https://docs.amplify.aws/lib/predictions/transcribe/q/platform/js/#set-up-the-backend

    let buff = await file?.arrayBuffer()
    await Predictions.convert({
        transcription: {
            source: {
                bytes: buff

            }
        }
    }).then(({ transcription: { fullText } }) => console.log({ fullText }))

It says

you can transcribe a PCM Audio byte buffer to Text, such as a recording from microphone.

But this example does not work.

file is an mp3 file.

When i pass it into bytes my result is ab empty string ""

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I guess i got it.

let buffer = await file.arrayBuffer()
let context = new AudioContext()
context.decodeAudioData(buffer, async res => {
    let output = res.getChannelData(0)
    await Predictions.convert({
        transcription: {
            source: {
                bytes: output

            }
        }
    }).then(({ transcription: { fullText } }) => console.log({ fullText }))
})

You need to use AudioContext. You decode your buffer and then get the channelData and pass this into your transcription

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!