943,741 Members | Top Members by Rank

Ad:
Jul 5th, 2004
0

How to convert wav to mp3 using VB?

Expand Post »
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

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub cmdSave_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSave.Click
  2.  
  3. Dim sName As String
  4. counter = counter + 1
  5. sName = "Test" & counter
  6.  
  7. WaveSaveAs((VB6.GetPath & "\" & sName & ".wav"))
  8. cmdRecord.Enabled = True
  9. cmdStop.Enabled = True
  10. cmdPlay.Enabled = True
  11. cmdSave.Enabled = False
  12. cmdReset.Enabled = False
  13. Exit Sub
  14.  
  15. 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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
janice_2k is offline Offline
4 posts
since May 2004
Jul 8th, 2004
0

Re: How to convert wav to mp3 using VB?

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.
Reputation Points: 14
Solved Threads: 0
Newbie Poster
cypher is offline Offline
17 posts
since Jul 2004
Jul 13th, 2004
0

Re: How to convert wav to mp3 using VB?

Reputation Points: 16
Solved Threads: 1
Posting Whiz in Training
mnemtsas is offline Offline
200 posts
since Jul 2004
Aug 8th, 2005
0

Re: How to convert wav to mp3 using VB?

Quote originally posted by mnemtsas ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dennis651 is offline Offline
1 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: printing a form
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: sql query updating problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC