-recorder.ts
      function arrayBufferToBase64(buffer) {
        let binary = "";
        const bytes = new Uint8Array(buffer);
        const len = bytes.byteLength;
        for (let i = 0; i < len; i++) {
          binary += String.fromCharCode(bytes[i]);
        }
        return window.btoa(binary);
      }

      async function recordAudio() {
        navigator.mediaDevices.getUserMedia({ audio: true }).then(async (stream) => {
          mediaStream = stream;
          const audioContext = new AudioCont