עבור לתוכן

צריך עזרה ב-voice recognition ב-vb 6

Featured Replies

פורסם

שלום חבריי. אני באמצע פרויקט. ניסיתי לשפר את הנגישות בתוכנית ע"י ה- voice recognition

אבל משום מה זה לא פועל לי.

הקוד שצירפתי זה הקוד שהשתמשתי בו בפרויקט וה-vb לא אומר שיש בעיה בקימפול או משהו,

פשוט התוכנית לא מחליטה לאיזה case להיכנס ולא מבצעת את מה שנדרש. מה לא עשיתי בסדר? פליז תעזרו לי!!

Option Explicit
Dim totaldata As String

Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal _
lpOperation As String, ByVal lpFile As String, ByVal _
lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long



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)
Dim sFile As String
Dim noth As Long

Select Case Phrase
Case "home"
MsgBox ("1")


Case "chair"
MsgBox ("2")


Case "phone"

MsgBox ("3")


End Select
End Sub

Private Sub Form_Load()


totaldata = "[Grammar]" & vbCrLf & _
"langid = 1033" & vbCrLf & _
"type=cfg" & vbCrLf & _
"[<Start>]" & vbCrLf & _
"<start>=Notepad" & vbCrLf & _
"<start>=Volume" & vbCrLf & _
"<start>=Media Player" & vbCrLf

DirectSR1.GrammarFromString (totaldata)
DirectSR1.Activate
End Sub

פורסם

הייתי ממליץ לשנות ב totaldata את Notepad / Volume / Media PLayer ב home / chair / phone

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים