I'm attempting to use NAudio to decode mu-law encoded audio into pcm audio. My service is POSTed the raw mu-law encoded audio bytes and I'm getting an error from NAudio that the data does not have a RIFF header. Do I need to add this somehow? The code I'm
WaveFileReader reader = new WaveFileReader(tmpMemStream);
using (WaveStream convertedStream = WaveFormatConversionStream.CreatePcmStream(reader))
WaveFileWriter.CreateWaveFile(recordingsPath + "/" + outputFileName, convertedStream);
I'm also saving the raw data to the disk and doing the decoding in Matlab which is working with no problem.
Thanks for the help!