class AudioProcessor extends AudioWorkletProcessor {
  process (inputs, outputs) {
    const input = inputs[0];
    if (input && input.length > 0) {
      const inputData = input[0];
      this.port.postMessage({ input: inputData });
    }
    return true;
  }
}

registerProcessor('audio-processor', AudioProcessor);