Convert wav file to wav file (format change)

Trying to find a workaround for my previous question , I would like to convert the 16k 8-bit mono-wav that is written in byte[] (which has a wav-header) to an 8k 8-bit mono stream / byte [].

Is there any .Net library with samples available for such a conversion?

Thanks.

+4
source share
2 answers

Thanks for the answers, I ended up using NAudio and with the following snippet, Voila! Everything works like a charm:

 WaveFormat target = new WaveFormat(8000, 8 , 1); WaveStream stream =new WaveFileReader("c:\\test.wav"); WaveFormatConversionStream str = new WaveFormatConversionStream(target, stream); WaveFileWriter.CreateWaveFile("c:\\converted.wav", str); 
+9
source

Alvas seems to support conversion as well as regular functions:

http://alvas.net/alvas.audio.aspx

+2
source

All Articles