Convert oga to wav using NAudio VorbisWaveReader exception: could not initialize container

207 Views Asked by At

I'm trying to convert a oga audio file downloded from whatsapp into a wav file. I'm using Naudio to perform the conversion. This is my code:

public void TestConvert()
        {
            string fileoga = @"C:\1.ogg";
            string filewav = @"C:\1.wav";
            var vorbis = new VorbisWaveReader(fileoga);
            WaveFileWriter.CreateWaveFile(filewav, vorbis);
            return;
        }

When trying to CreateWaveFile I get the following exception: Could not initialize container!

I tried with using and without and all the other suggestions online. Will appriciate your help.

0

There are 0 best solutions below