Using Azure speech to text with nodejs converting mulaw to pcm

Kenneth Arakelian 6 Reputation points
2021-09-29T12:29:03.187+00:00

I'm using twilio

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,391 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Anees Sadeek 5 Reputation points
    2023-03-30T07:21:00.56+00:00

    createPushStream() accepts mulaw format(maybe not when you write this question).

    Made some changes to your code and it's working fine. These are the updates

    const azurePusher = sdk.AudioInputStream.createPushStream(sdk.AudioStreamFormat.getWaveFormat(8000, 16, 1, 2));

    And passed the stream directly after decode

    azurePusher.write(Buffer.from(msg.media.payload, "base64"));

    1 person found this answer helpful.
    0 comments No comments