954,202 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to convert wav to mp3 using VB?

Dear gurus and members,
I am a newbie in VB and programming. I have created an exe that allows to record, play and save user's speech onto his computer. The file is saved as wav. I wonder is it possible to convert the files to mp3 format when user clicks on Save button? I use VB6 to create the MCI and currently stucked in the convertion of wav to mp3. The following is the code of my Save button

Private Sub cmdSave_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSave.Click

        Dim sName As String
        counter = counter + 1
        sName = "Test" & counter

        WaveSaveAs((VB6.GetPath & "\" & sName & ".wav"))
        cmdRecord.Enabled = True
        cmdStop.Enabled = True
        cmdPlay.Enabled = True
        cmdSave.Enabled = False
        cmdReset.Enabled = False
        Exit Sub

End Sub


I would be very glad if someone could share the knowledge and expertise in this area with me. Looking forward to some replies soon.

Thanks in advance,
Janice

janice_2k
Newbie Poster
4 posts since May 2004
Reputation Points: 10
Solved Threads: 0
 

The short answer is "You can't". It *is* possible, but the MP3 format is proprietary, so if you created an MP3 you could be facing a lawsuit. There are plugins and libraries that offer MP3 export functions, but you'll probably pay quite a bit for them, since they also had to pay for a license to use the MP3 format.

I can't help you with this either, but you might consider OGG (Ogg Vorbis) format. It's a smaller file, and slightly better quality than MP3. Plus it's OGL, so it's free.

cypher
Newbie Poster
17 posts since Jul 2004
Reputation Points: 14
Solved Threads: 0
 
mnemtsas
Posting Whiz in Training
200 posts since Jul 2004
Reputation Points: 16
Solved Threads: 1
 
Try this link http://www.vbcodesource.com/downloads/encoderex.zip

Hi there,
I downloaded and i tried to run that but i got this message("File not found"MEncoder.dll) then i tried to register that :Regsvr32 "c:\windows\system32\MEncoder.dll") but got this message"
Loadlibrary(c:\windows\system32\MEncoder.dll)failed-The specified module could not be found
I am using windows xp but i tried on windows2000 advanced server and it was the same problem.Could you please help me ?

thanks,

Dennis

dennis651
Newbie Poster
1 post since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You