code: function () {
      var duration = 50;
  
      // Check if there is any data in the queue
      if (audioDataQueue.length > 0) {
  
          // Concatenate up to concatenateMaxChunks data arrays from the queue
          var concatenatedData = [];
          for (var i = 0; i < concatenateMaxChunks; i++) {
              if (audioDataQueue.length === 0) {
                  break;
              }
              concatenatedData = concatenatedData.concat(audioDataQueue.shift());
          }
  
          // Play the audio
          duration = playAudio(concatenatedData) * 1000;
      }
  
      // Still capturing? Then call myself to continue consuming incoming data.
      if (window.audioinput && audioinput.isCapturing()) {
          timerGetNextAudio = setTimeout(getNextToPlay, duration);
      }
  }
docs: Consume data from the audioinput queue and calls the playAudio method