>

  <script>
    function playBeep() {
      var frequency = parseFloat(document.getElementById('freq').value);
      var duration = 1 / 50; // Duration in seconds (1/50th of a second)

      // Create an instance of AudioContext
      var AudioContext = window.AudioContext || window.webkitAudioContext;
      var audioCtx = new AudioContext();

      // Create an oscillator node
      var oscillator = audioCtx.createOscillator();
      oscillator.type = 'square'; // Square wave to mimic PC speaker sound
  