I have been using Naudio package to convert MP4 audio to WAV, so far things are working out but I have to save the WAV file after converting it
// create media foundation reader to read the AAC encoded file from URL
using (MediaFoundationReader reader = new MediaFoundationReader(audioUrl))
// resample the file to PCM with same sample rate, channels and bits per sample
using (ResamplerDmoStream resampledReader = new ResamplerDmoStream(reader,
new WaveFormat(reader.WaveFormat.SampleRate, reader.WaveFormat.BitsPerSample, 2)))
// create WAVe file
using (WaveFileWriter waveWriter = new WaveFileWriter(fileFullPath,
resampledReader.WaveFormat))
// save wav file physically on os
resampledReader.CopyTo(waveWriter);
I tried to read waveWriter stream but apparently I can't do that as its write only stream so my question is is there any way I can read waveWriter directly instead of saving it to a file then read that file again