I am currently using NAudio to capture the sound and it only creates a wav file. I am looking for a way to encode it to an mp3 before saving the file. I found LAME but when ever i try to add the lame_enc.dll file it says "A reference could not be added. Please make sure the file is accessible, and that is a valid assembly or COM component". Any help would be appreciated.
|
|
Easiest way in .Net 4.0: Use the visual studio Nuget Package manager console:
Code Snip: Send speech to a memory stream, then save as mp3:
|
|||
|
|
|
Just place the lame_enc.dll in bin folder and don't try to add it to reference. After that try this code. Here you can also set bit rate like 64,128,.....
|
|||
|
|
|
The file I posted a step-by-step on how to use this for MP3 encoding in response the question: change format from wav to mp3 in memory stream in NAudio. That should get you started. |
|||
|
|