Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

173
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda