Visual Studio .NET - Recording Sound into a file in VB NET

Asked By paul scherz on 27-Oct-05 09:10 PM
Does anyone know how to create a simple audio recorder using VB.NET code?

recording voice in vb net - Asked By vanam mallik on 06-Nov-05 11:54 PM

recording and playing voice in vb.net

sound record - Asked By mutasem ali on 30-Nov-05 04:36 AM

I want to record some sound by vb Please

friendly - anwar fouad replied to paul scherz on 12-Dec-06 09:37 AM

thanxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
fffffff - anwar fouad replied to mutasem ali on 12-Dec-06 09:38 AM
thanxxxxxxxxxxxxxxxxxxxxxxxxxxxx
how do i record sound? - vinay cs replied to mutasem ali on 11-Jan-07 12:50 AM
end of post
how do i record sound? - vinay cs replied to mutasem ali on 11-Jan-07 12:51 AM
end of post
Record your voice - san san replied to vinay cs on 13-Oct-08 02:53 PM
Do you want to record your voice from Microphone? If yes, you can use the Microsoft APIs to solve this issue. It's a very simple approach to record your voice from Mic.

Follow the code bellow...

1. Open C#.net web applications. And added the bellow namespace.

using Microsoft.VisualBasic.Devices;
using Microsoft.VisualBasic;
using System.Runtime.InteropServices;

2. Add the below API.
[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern int mciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback);

3. Create three Buttons and given the below name and text for the buttons.

1. Record
2. SaveStop
3. Read

1. Under Record Button Click paste the below Code:

// record from microphone
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0);
mciSendString("record recsound", "", 0, 0);


2. Under Save / Stop button Click,


// stop and save
mciSendString("save recsound c:\\record.wav", "", 0, 0);
mciSendString("close recsound ", "", 0, 0);
Computer c = new Computer();
c.Audio.Stop();


3. Under Read Button Click

Computer computer = new Computer();
computer.Audio.Play("c:\\record.wav", AudioPlayMode.Background);


Save and Execute it.

recorder - sreekanth ms replied to paul scherz on 02-Dec-08 02:21 AM
Does anyone know how to create a simple audio recorder using VB.NET code?
jerome replied to san san on 18-Jul-10 12:11 AM

about the topic...


is it necessary to use c++ ???


because i have the same project but I doesn't know how to use c or c++ because java and vb.net is the only thing that I know''


Is it possible to make a voice recognition project using this two languages???


jeank replied to paul scherz on 04-Oct-11 11:22 PM
where is the computer code of the class???