title: Capture audio from JavaScript and recognize it with Google Speech API
body: <p>I use <a href="https://github.com/mattdiamond/Recorderjs" rel="nofollow noreferrer">https://github.com/mattdiamond/Recorderjs</a> library to capture the audio.</p>
  
  <pre><code>recorder.exportWAV((data)-&gt;
          fileReader = new FileReader;
          fileReader.onload = (blob) -&gt;
              blob = blob.target.result;
              send(btoa(blob))
          fileReader.readAsBinaryString(data)
        )
  </code></pre>
  
  <p>But I got the following error: <code>Must use single channel (mono) audio, but WAV header indicates 2 channels.</code></p>
  
  <p>When I use <code>exportMonoWAV</code> the quality of audio is very low and recognition results are poor.</p>
  
  <p>How can I pass Mono WAV without losing the quality?</p>