|
-
May 14th, 2000, 12:53 AM
#1
Thread Starter
Fanatic Member
Hey instead of MCI why don't you use Microdofts SAPI direct sound recognition. It would be a 15 to 20 line code if you want toexecute any one program
-
May 14th, 2000, 01:16 AM
#2
New Member
Not heard of this SAPI - is it a freeware add-in or does it ship?
Had a scout thru my VB stuff to no avail - but I am very interested if it does it
J121
-
May 14th, 2000, 02:35 PM
#3
Thread Starter
Fanatic Member
Yeah I think so it is free. Search for it on Microsoft's site. I got this control when I loaded a text to speech software form http://www.readplease.com which is a freeware.
Here is the code to launch IE, Notepad an Calculator by speaking it out in your microphone.
Private Sub DirectSR_PhraseFinish(ByVal flags As Long, ByVal beginhi As Long, ByVal beginlo As Long, ByVal endhi As Long, ByVal endlo As Long, ByVal Phrase As String, ByVal parsed As String, ByVal results As Long)
txtCommand.Text = Phrase
Select Case Phrase
Case Is = "Launch Notepad"
retval = Shell("C:\windows\notepad.exe")
Case Is = "Launch Browser"
retval = Shell("C:\windows\iexplore.exe")
Case Is = "Launch Calculator"
retval = Shell("C:\windows\Calc.exe")
End Select
End Sub
Private Sub Form_Load()
Dim retval As Integer
DirectSR.GrammarFromString "[Grammar]" + vbNewLine + _
"type=cfg" + vbmewline + _
"[<start>]" + vbNewLine + _
"<start>=Launch Notepad" + vbNewLine + _
"<start>=Launch Browser" + vbNewLine + _
"<start>=Launch Calculator" + vbNewLine
DirectSR.Activate
End Sub
Good Luck
Kinjal
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|