Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda