2 Replies - 962 Views - Last Post: 03 August 2013 - 06:00 AM Rate Topic: -----

#1 Jeeves  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 03-August 13

MSAgent & TTS Problem

Posted 03 August 2013 - 04:43 AM

I am having problems with using MSAGENT and TTS and need help.
What is happening is that for some reason all of a sudden the agent will begin speaking the same phrase over and over and at will say things without saying anything to it. For example I may say hello and the response back would be hello and that will work. But for some reason it will begin cycling through its phrases and talking without anything being said to it. Here is a snip it of the code I am using.

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 replyfiletext As String

    Case "How are you"
        'SendKeys "How are you"
        lblReply.Caption = "How are you"
        Open App.Path & "\okreply.txt" For Input As #1
        Input #1, replyfiletext
        lblReply.Caption = replyfiletext
        AC.Speak replyfiletext
        AC.Speak "How are you,, today"
        On Error Resume Next
        Close #1
    End Select
End Sub



This same action is done for several other voice commands.
Can someone please help.

This post has been edited by andrewsw: 03 August 2013 - 05:50 AM
Reason for edit:: Code indents


Is This A Good Question/Topic? 0
  • +

Replies To: MSAgent & TTS Problem

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3246
  • View blog
  • Posts: 10,886
  • Joined: 12-December 12

Re: MSAgent & TTS Problem

Posted 03 August 2013 - 05:49 AM

I know people like that, so it seems accurate :bigsmile:

However, is the code you posted where you believe the error occurs, or is there other relevant code that you need to post?

BTW I've changed the code-indentation in your post to make it easier to read.

This post has been edited by andrewsw: 03 August 2013 - 05:51 AM

Was This Post Helpful? 0
  • +
  • -

#3 Jeeves  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 03-August 13

Re: MSAgent & TTS Problem

Posted 03 August 2013 - 06:00 AM

Other than the form load event.

DirectSR1.GrammarFromFile App.Path & "\Words.txt"
DirectSR1.Activate

Agent1.Characters.Load "Merlin", "Merlin.acs"
Agent1.Characters.Character("Merlin").Balloon.Visible = False
    Set AC = Agent1.Characters("Merlin")
    AC.TTSModeID = "{227A0E41-A92A-11d1-B17B-0020AFED142E}"
    AC.MoveTo 100, 300
    AC.Show
End Sub



The rest of the code is just a repeat of the first posting with the exception of it calling to open other text files for a reply to a question. After each one the text file is closed.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1