Jump to content

Programming Help:Listen Method

From Agentpedia, the Microsoft Agent encyclopedia
Listen Method
The Listen Method turns on Listening mode (speech recognition for a timed period.
Introduced in version:Microsoft Agent 2.0
Removed in version: Still in use
Allowed values:State (True to turn listening mode on, False to turn it off)
Default value:N/A


Parts

Part Description
State Required. A boolean balue that determines whether to turn Listening mode on or off. True turns listening mode on while False turns listening mode off.

Examples

Inline example (VB.NET)
Robby.Listen(True)
Advanced example (VB.NET)
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Peedy.Speak("Alright, thank you for pressing that button. Let me hear what you have to say...")
        Peedy.Listen(True)
        If Peedy.Listen(True) Then
            Peedy.Speak("I heard you!")
        End If
    End Sub

Remarks

Setting this method to true enables Listening mode (turns on speech recognition) for a fixed period of time (10 seconds).