ext({ sampleRate: 16000 });
          source = audioContext.createMediaStreamSource(stream);

          const workletName = "audio-recorder-worklet";

          const AudioRecordingWorklet = `
            class AudioProcessingWorklet extends AudioWorkletProcessor {

              // send and clear buffer every 2048 samples,
              // which at 16khz is about 8 times a second
              buffer = new Int16Array(2048);

              // current write index
              bufferWriteIndex = 0;

        