Skip to content

Issue Transcribing Twilio Media Stream Using @aws-sdk/client-transcribe-streaming #4648

Discussion options

You must be logged in to vote

Quick update, I was able to get this working this morning with a slight variation on the code snipped above.

new stream.Transform({
  transform(chunk, encoding, done) {
    const wav = new WaveFile();
    wav.fromScratch(1, 8000, '8m', chunk);
    wav.fromMuLaw();
    this.push(Buffer.from(wav.data.samples));
    done();
  }
});

This is how I'm writing to the transform stream.

transformStream.write(Buffer.from(payload, 'base64'))

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@AdityaPurohit11
Comment options

Answer selected by ajporterfield
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants