HI
Hope you are doing well.
I have been working on voice recording programme.
It works and plays the sound as a recorder but I want to know how to check if there is a voice input coming on or not. I mean how to check if the user is still saying something or the user have no more to say. so that I can hit "enter " key for another procedure to run.
Below is my code
please help me in it
Hope you are doing well.
I have been working on voice recording programme.
It works and plays the sound as a recorder but I want to know how to check if there is a voice input coming on or not. I mean how to check if the user is still saying something or the user have no more to say. so that I can hit "enter " key for another procedure to run.
Below is my code
Code:
Public Class Form1
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, _
ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, _
ByVal hwndCallback As Integer) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' record from microphone
mciSendString("open new Type waveaudio Alias recsound", "", 0, 0)
mciSendString("record recsound", "", 0, 0)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
' stop and save
mciSendString("save recsound c:\record.wav", "", 0, 0)
mciSendString("close recsound", "", 0, 0)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
' play audio
My.Computer.Audio.Play("c:\record.wav", AudioPlayMode.Background)
End Sub
End Class
please help me in it