关于speech SDK4.0的DirectSR控件
我使用了speech SDK4.0的DirectSR控件,代码如下:
Dim r As Integer
Private Sub Command1_Click()
DirectSR1.Activate
End Sub
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)
If Phrase = "Run Word " Then
Phrase = " "
Text1.Text = "Word is running "
r = Shell( "c;\prigram file\Microsoft office\office\winword.exe ")
End If
If Phrase = "Run excel " Then
Text1.Text = "excel is running "
r = Shell( "c;\prigram file\Microsoft office\office\excel.exe ")
End If
MsgBox ( "The command is wrong! ")
End Sub
Private Sub Form_Load()
DirectSR1.GrammarFromString ( "[Grammar] " + vbNewLine + "type=cfg " + vbNewLine + "[ <start> ] " + vbNewLine + " <start> +Run Word " + vbNewLine + " <start> =Run Excel " + vbNewLine)
End Sub
可是我无论如何也触发不了PhraseFinish事件,在什么条件下触发PhraseFinish事件,在哪里可以得到DirectSR控件的资料?谢谢。
[解决办法]
帮顶
[解决办法]
为什么没有人回答我的问题呀,这个speech SDK4.0的directSR控件是微软开发的语音识别控件,用的人可能不是太多,大家帮忙顶一下.
[解决办法]
好伤心呀,怎么没人回答我的问题呀?呜呜。。
[解决办法]
没见过这控件
人肉顶楼一下