Results 1 to 4 of 4

Thread: Using Speech Recognition and Text2Speech controls in VB apps????

  1. #1

    Thread Starter
    Addicted Member Virtual24's Avatar
    Join Date
    May 2001
    Posts
    228

    Question Using Speech Recognition and Text2Speech controls in VB apps????

    PLEASE!!! I need help on how to get the code for the Speech Recognition (DirectSR) and Text to Speech (DirectSS) controls to work... I downloaded the SDK 5.0 already and installed it. i've done the normal "Phrase thing" but it never picks up my word. and i use this: DirectSS1.Speak ("Hello.") and that doesn't work either... I have all the references and components added and it works when i test i under the thing in the control pannel. HELP ME!!!

  2. #2
    Megatron
    Guest
    Try this:
    Code:
    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 = "hello" Then
        Phrase = ""
        DirectSS1.Speak "Hi to you too."
    End If
    
    If Phrase = "bye" Then
        Phrase = ""
        DirectSS1.Speak "goodbye."
    End If
    
    Text1.Text = Phrase
    
    End Sub
    
    Private Sub Form_Load()
    
    ' The following are words that the Engine will reconize
    DirectSR1.GrammarFromString "[Grammar]" + vbNewLine + _
             "type=cfg" + vbNewLine + _
             "[<start>]" + vbNewLine + _
             "<start>=hello" + vbNewLine + _
             "<start>=bye" + vbNewLine
    DirectSR1.Activate
    
    End Sub
    Speak the words "Hello" and "Bye," and the computer should reply.

  3. #3
    Megatron
    Guest
    Also, make sure that you train your engine every so often to that the DirectSR control (or engine) can recognize your voice more easily.

  4. #4
    GuitarMan
    Guest

    No no no no....

    use Directss1.sayit = "Hello"

    while im at it anyone ever worked with flightsim 2000?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width