loku help 1k

Blaster1234

Member
Jan 10, 2009
453
12
0
Colombo
mcn laaaaaaa
man web 1k develope karanawa
eke podi part ekakata voice recording part 1k thiyenawa
kawru hari mata asp.net walin voice record karana hati dannawanam kiyala denawada loku udawwak mcn
man hodatama hira wela inne
plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz :(:(:(:(:(:(:(:(:(:(
 

djtwinz

Well-known member
  • Jun 23, 2007
    1,881
    273
    83
    taprobane
    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. I provided C#.net code to solve this issue.
    1. Open C#.net web applications. And added the blow 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.

    Also try this sample :)
     

    Blaster1234

    Member
    Jan 10, 2009
    453
    12
    0
    Colombo
    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. I provided C#.net code to solve this issue.


    Also try this sample :)


    hari mcn oke nthiyenne .net (standalone) ne mcn
    mata ona web site ekakin oya wade kara ganna hatiy
    ehema 1k nadda