|
-
Dec 22nd, 2000, 04:43 PM
#1
-
Dec 22nd, 2000, 05:37 PM
#2
Here is a short example, using a vocab file
Code:
'just run the program and say either 1, 2 or 3 and the number
'should appear in the textbox
Option Explicit
'this event fires when DirectSR1 detects a end of a phrase,
'the sub itself passes the variable Phrase - which contains
'the word that was recognised, in this case, the word
'that is recognised is put into Text1
Private Sub DirectSR1_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)
Text1.Text = Phrase
End Sub
Private Sub Form_Load()
DirectSR1.GrammarFromFile (App.Path & "\words.txt")
'this line of code tells the program to load the file
'words.txt from its working directory.
'the words stored in this file are the words that the
'Xlisten.dll will recognise.
DirectSR1.Activate
'the DLL is activated and it starts to 'listen' for words
'that it recognises
End Sub
and inside the text file is this:
[Grammer]
type=cfg
[<start>]
<start>=1
<start>=2
<start>=3
Hope this helps,
Sunny
-
Dec 23rd, 2000, 04:56 AM
#3
Where Is this grammer file ?
-
Dec 23rd, 2000, 05:00 AM
#4
Sorry Im a real newbie 
It says variable not defined
Please help
-
Dec 23rd, 2000, 01:56 PM
#5
Please Help I cant find anything on it
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
|