Convert .wav to .mp3 using Lame.exe in C#

public void mciConvertWavMP3(string fileName, bool waitFlag)
//maxLen is in ms (1000 = 1 second)
string outfile= "-b 32 --resample 22.05 -m m \""+pworkingDir+fileName + "\" \"" + pworkingDir+fileName.Replace(".wav",".mp3")+"\"";
System.Diagnostics.ProcessStartInfo psi=new System.Diagnostics.ProcessStartInfo();
System.Diagnostics.Process p=System.Diagnostics.Process.Start(psi);
if (waitFlag)
// wait for exit of called application

This code will help us to convert .wav file in to .mp3



Singee said...

Works perfectly, thanks a lot!

Priyank Bolia said...

Looks to me plagiarism, copied from, without any modification, extension.
Bad Bad Bad...

vipin said...

I want to know that how lame.exe can be used in the provided code.

(by registering it !)

I have no idea so please tell me in detail.


Ram said...

Hi vinoth,

I tried the sample above, but tis not working.

i've downloaded lame.exe, and the code runs without exception, but no output.

can you explaing in details. its an urgent work. please reply

Author said...

Thanks for the post

convert mp3 to wav

Kante Luis said...

Can convert from online for free. With Ringtone cutter for android you do all the above