title: How to convert headerless ima-adpcm raw file to wav using sox
body: <p>I am trying to convert a raw file (header-less) to wav</p>
  
  <p>It is in ADPCM 16 rate 8000</p>
  
  <p>I have tried three console commands</p>
  
  <pre><code>sox -e ima-adpcm -r 8000 input.raw output.wav
  sox -e ima-adpcm -r 8000 -b 16 input.raw output.wav
  </code></pre>
  
  <p>These trigger the same error:</p>
  
  <pre><code>sox FAIL formats: bad input format for file `input.raw': data encoding or sample size was not specified
  </code></pre>
  
  <p>and last attempt</p>
  
  <pre><code>sox -t raw -t wav -e ima-adpcm -r 8000 -b 16 input.raw output.wav
  </code></pre>
  
  <p>which triggers another error</p>
  
  <pre><code>sox FAIL formats: can't open input file `input.raw': WAVE: RIFF header not found
  </code></pre>
  
  <p>Do you know why I get these errors?</p>
  
  <p>Thanks</p>
  
  <p>EDIT</p>
  
  <p>An hex dump of the first 48 bytes FYI</p>
  
  <pre><code>C0 0C 00 03 00 00 37 C0 34 0C D0 30 37 C0 30 C7 CD D3 C0 03 CD 00 37 03
  C0 00 0D 0C CD 00 C0 10 0F 00 03 55 0B 4B 0F 0F 0C 0F 34 0F 0D C3 0D 03
  00 C0 31 00 00 D0 C0 00 F4 4C 03 33 34 33 31 33 0D 33 D0 03 C0 4C C0 43
  </code></pre>