title: Play wav file as bytes received from server
body: <p>I am receiving a raw data wave file from server, and I need to play this array of bytes on the client side.</p>
  
  <p>I tried to use decodeAudioData like in this <a href="https://stackoverflow.com/questions/24151121/how-to-play-wav-audio-byte-array-via-javascript-html5">link</a>  but i got the error : </p>
  
  <blockquote>
    <p>DOMException : Unable to decode Audio data.</p>
  </blockquote>
  
  <p>It is logical because my raw data is not a regular mp3 file, it is a wave that needs to be played with 8000Hz rate and 1 channel and 16bits per sample.</p>
  
  <p>Is there a function to play a byte array received from server with a certain rate and a number of channels</p>