process = function (pcmInt16Array) {
      /**
       * Processes a frame of audio. The required sample rate can be retrieved from '.sampleRate' and the length
       * of frame (number of audio samples per frame) can be retrieved from '.frameLength'. The audio needs to be
       * 16-bit linearly-encoded. Furthermore, the engine operates on single-channel audio.
       * @param {Int16Array} A frame of audio with properties described above.
       * @returns {Number} Index of detected keyword (phrase). When no keyword is detected it returns -1.
       */

      let pcmWasmBuffer = new Uint8Array(
        porcupineModule.HEAPU8.buffer,
        pcmWasmPointer,
        pcmInt16Array.byteLength
      );
      pcmWasmBuffer.set(new Uint8Array(pcmInt16Array.buffer));

      let keyword_index = processWasm(handleWasm, pcmWasmPointer);
      if (keyword_index === -2) {
        throw new Error("Porcupine failed to process audio");
      }

      return keyword_index;
    }
Releases resources acquired by WebAssembly module.