@wppconnect/wa-js - v4.7.2
    Preparing search index...

    Function pushAudio

    • Stream PCM audio to the call, for audio generated on the fly (TTS, voice bots, audio coming from Node.js). Chunks are queued and played back to back.

      Accepts a Float32Array (-1 to 1), an Int16Array or a base64 string of little-endian Int16 PCM.

      Returns the seconds of audio still queued.

      Parameters

      Returns number

      WPP.call.enableAudioInjection();
      // From Node.js, for example with puppeteer:
      await page.evaluate((chunk) => WPP.call.pushAudio(chunk), base64Pcm16k);