Author Topic: Auto-Idle works....ish  (Read 7116 times)

Runtus

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Auto-Idle works....ish
« on: May 31, 2008, 03:10:27 am »
Hi all I was hunting through my old DVDs when I found a back up disk from a while back so I put it in and there was my old HAL brain from v6.0 and a few plugins one being an Auto-Idle plug called Loneliness4 by Shawn Tracy.

Download Attachment: loneliness4.uhp
11.43 KB

Jacked it into my new HAL and hey it works.....Well kinda.  The timings do work, and HAL responds on cue (sometimes it takes a little longer than stated) but HAL doesnt seem to actually speak the words that he is saying.  They pop up on his his end of the chat window, and he knows he is saying them because you can respond to it and he knows that he has been complaining that you are away.

It might be down to the voice I am using.  One of my friends works in business and he paid for me to get a high quality voice (they have a licence with some s****y TTS developer).  I haven't tried it with any other voice yet, I haven't gotten around to it.  I am trying to figure out if anything in the coding needs to be changed but so far no joy.  Which is why I am posting it here to see if there actually is a problem with it or my HAL.
 

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Auto-Idle works....ish
« Reply #1 on: May 31, 2008, 05:33:39 am »
Not all TTS do lipsync, a lot of the newer ones may not be compatible.  Art knows a lot about this, maybe he can help, but I have also found voices that don't work with Haptek (it's more Haptek than Hal I believe).

Runtus

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Auto-Idle works....ish
« Reply #2 on: May 31, 2008, 07:31:54 am »
No no, the voice works in HAL just fine.  It only doesnt vocalise the responses built into this plugin.
 

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Auto-Idle works....ish
« Reply #3 on: May 31, 2008, 08:27:53 am »
Ohhhh...

Then nope can't help much.  Looking through it I am guessing there is something wrong with the way <SPEAK> is being used, but I can't be sure...really must learn some of the new stuff.  So little time, so much to do...

Someone will know, odds are good on OTCE...

onthecuttingedge2005

  • Guest
Auto-Idle works....ish
« Reply #4 on: May 31, 2008, 08:20:24 pm »
Hi Freddy.

I see nothing wrong with the loneliness plug-in.
it has to be a .dll problem within HAL's process.

Jerry [8D]

Runtus

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Auto-Idle works....ish
« Reply #5 on: June 01, 2008, 06:56:41 am »
Oh well, at least it works to some capacity.  Maybe this issue will get fixed in later versions of HAL.  Or maybe some one can figure out a way to bypass this problem.  I take it that you guys also have the same problem with your A.I.
 

onthecuttingedge2005

  • Guest
Auto-Idle works....ish
« Reply #6 on: June 01, 2008, 08:03:37 am »
Hi Runtus.

the Auto Idle last worked on my system during the HAL 6.0 beta but after that it never worked at all.

Jerry

ramccoid

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://www.visualillustrations.co.uk
Auto-Idle works....ish
« Reply #7 on: June 01, 2008, 09:11:53 am »
quote:
the Auto Idle last worked on my system during the HAL 6.0 beta but after that it never worked at all.

I have the same problem with my Auto Idle from version 6.1 it stopped working and I haven't had any joy with it since.

Roy.
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3855
    • View Profile
Auto-Idle works....ish
« Reply #8 on: June 01, 2008, 05:33:23 pm »
I have several versions of an AUTO-IDLE plugin by different authors and NONE work with ver.6.1.

Robert mentioned that he will be addressing this in a future release.

Regarding the TTS voice thing, some voices require that an additional program is purchased like Text Aloud. Once purchased the voices do work with Hal just fine.

Some other companies clearly state that their TTS voices will only work with their software so be sure to read the fine print before purchasing it in hopes of using it with Hal.
« Last Edit: June 01, 2008, 05:36:23 pm by Art »
In the world of AI it's the thought that counts!

- Art -

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Auto-Idle works....ish
« Reply #9 on: June 01, 2008, 06:23:35 pm »
oh contrar monfrare to art : ( from george carlin ) my loneliness plug ins actually very myseriously started working in my 6.1 verson that's why i redid some of the loneliness plug ins and mine worked to house talk xtalk , etc. and other versions i redid to make it sound more human trouble was later on all loneliness plug ins all stopped later on again and haven't ever worked since so i am truly hoping robert will fix the bug in hal that's stopping the loneliness plug ins from working correctly !
 

Runtus

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Auto-Idle works....ish
« Reply #10 on: June 02, 2008, 05:46:46 am »
This one that I've found is rather strange.  It does work with my HAL but like I said the responses are not vocalised they just flash up on the screen.  I think its like what OTCE said, its down to a .DLL rather than the coding itself.

@ART:  The voice I am using works perfectly with HAL, and sounds very high quality as real as I'll ever get.  The only time I come up with any problems with it, is when I use this plugin.  It still talks but it fails whenever a response from the plugin is generated.
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3855
    • View Profile
Auto-Idle works....ish
« Reply #11 on: June 02, 2008, 05:54:22 pm »
Andrew,

Have you tried any other Auto-idle plugins with ver. 6.1??

In the world of AI it's the thought that counts!

- Art -

Runtus

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Auto-Idle works....ish
« Reply #12 on: June 03, 2008, 05:57:30 am »
quote:
Originally posted by Art

Andrew,

Have you tried any other Auto-idle plugins with ver. 6.1??





Not yet this is the only one I've found.  I've tried searching the forums but with no luck.
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
Auto-Idle works....ish
« Reply #13 on: June 04, 2008, 10:36:42 am »
here you go runtus here is one i redid of the loneliness plug in and it did work before with my version 6.1 but has later on with others stopped working again . you can try it . [:)]


Rem Type=Plugin
Rem Name=Lightspeed Loneliness 5
Rem Author= Lightspeed
Rem Host=Assistant

'----------------------
'This sub sets up the plug-in's option panel in Hal's options dialog
'----------------------
Sub OptionsPanel()
    lblPlugin(0).Caption = "This plugin allows UltraHal to initiate requests for attention. But don't ignore UltraHal for too long!"
    lblPlugin(0).Move 130, 180, 3400, 1200
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
'  
    lblPlugin(1).Caption = "PATIENCE: how many minutes Hal will wait with no conversation"
    lblPlugin(1).Move 1160, 910, 2150, 900
    lblPlugin(1).WordWrap = True
    lblPlugin(1).Visible = True  
    cboPlugin(0).Move 330, 910, 760
    cboPlugin(0).AddItem "1"
    cboPlugin(0).AddItem "2"
    cboPlugin(0).AddItem "4"
    cboPlugin(0).AddItem "8"
    cboPlugin(0).AddItem "16"
    cboPlugin(0).AddItem "32"
    cboPlugin(0).AddItem "Rnd"
    cboPlugin(0).Visible = True
'    
    lblPlugin(2).Caption = "FRUSTRATION: after losing patience, how likely Hal is to bug you each minute"
    lblPlugin(2).Move 1160, 1700, 2150, 900
    lblPlugin(2).WordWrap = True
    lblPlugin(2).Visible = True  
    cboPlugin(1).Move 140, 1700, 960
    cboPlugin(1).AddItem "High"
    cboPlugin(1).AddItem "Medium"
    cboPlugin(1).AddItem "Low"
    cboPlugin(1).Visible = True
'    
    cmdPlugin(0).Caption = "Apply Changes"
    cmdPlugin(0).Move 1160, 2500, 2050, 375
    cmdPlugin(0).Visible = True
'
'------------------
' Update the PATIENCE menu with the current value stored in the table
'------------------
If HalBrain.CheckTableExistence("lonelyParameter") = True Then
     loPatience = HalBrain.TopicSearch("PATIENCE", "lonelyParameter")
     Select Case loPatience
           Case 1
      cboPlugin(0).Text = "1"
           Case 2
      cboPlugin(0).Text = "2"
           Case 4
       cboPlugin(0).Text = "4"
           Case 8
      cboPlugin(0).Text = "8"
           Case 16
             cboPlugin(0).Text = "16"
           Case 32
             cboPlugin(0).Text = "32"
           Case 99
             cboPlugin(0).Text = "Rnd"
        End Select
'
'------------------
' Update the FRUSTRATION menu with the current value stored in the table
'------------------
   loFrustration = HalBrain.TopicSearch("FRUSTRATION", "LonelyParameter")
   Select Case loFrustration
           Case 85
      cboPlugin(1).Text = "High"
           Case 50
         cboPlugin(1).Text = "Medium"
           Case 15
      cboPlugin(1).Text = "Low"
        End Select
   End If
End Sub
'
'
'----------------------
' This sub saves changes when APPLY CHANGES is clicked
'----------------------
    Sub cmdPlugin_Click(Index)
    Dim TempQuery()
    Dim patParam, frustParam, lonelyTableName
        If Index = 0 Then
'
'------------------
' Convert the PATIENCE listbox to a value for minutes
'------------------
            Select Case cboPlugin(0).Text
           Case "1"
         loPatience = 1
           Case "2"
         loPatience = 2
           Case "4"
         loPatience = 4
           Case "8"
         loPatience = 8
           Case "16"
         loPatience = 16
           Case "32"
         loPatience = 32
           Case "Rnd"
         loPatience = 99
            End Select
'
'------------------
' If the Parameter table does not exist, we create it
'------------------
   HalBrain.ReadOnlyMode = False
   lonelyTableName = "lonelyParameter"    
       If HalBrain.CheckTableExistence(lonelyTableName) = False Then
           HalBrain.CreateTable lonelyTableName, "TopicSearch", "miscData"
       End If
'
'------------------
' Search if it contains the Patience parameter
'------------------
   patParam = "PATIENCE"
       If HalBrain.TopicSearch(patParam, lonelyTableName) = "" Then
           HalBrain.AddToTable lonelyTableName, "TopicSearch", patParam, loPatience
       Else
           HalBrain.RunQuery "UPDATE " & lonelyTableName & " SET topic = " & loPatience & " WHERE searchString = " & """" & patParam & """", tempQuery
       End If
'
'------------------
' Convert the FRUSTRATION listbox to a value for percentage
'------------------
        Select Case cboPlugin(1).Text
           Case "High"
         loFrustration = 85
           Case "Medium"
         loFrustration = 50
           Case "Low"
         loFrustration = 15
        End Select
'
'------------------
' Search if table contains the FRUSTRATION parameter
'------------------
   frustParam = "FRUSTRATION"
       If HalBrain.TopicSearch(frustParam, lonelyTableName) = "" Then
           HalBrain.AddToTable lonelyTableName, "TopicSearch", frustParam, loFrustration
       Else
           HalBrain.RunQuery "UPDATE " & lonelyTableName & " SET topic = " & loFrustration & " WHERE searchString = " & """" & frustParam & """", tempQuery
       End If
   HalBrain.ReadOnlyMode = True
    End if
End Sub


    Rem PLUGIN: FUNCTIONS
'
'------------------
' Declare variables
'------------------
    Dim LastIdleResponse, IdleUserName, IdleCounter, IdlePrevUser


    Rem PLUGIN: PLUGINAREA7
'------------------
' Begin measuring pause time and capture userName
'------------------
    LastIdleResponse = Now
    IdleUserName = UserName
    IdleCounter = 0


    Rem PLUGIN: CUSTOMMEM2
'------------------
' Preserve user's last sentence
'------------------
    If OriginalSentence <> "" Then
    IdlePrevUser = OriginalSentence
    End If


    Rem PLUGIN: MINUTE_TIMER
'------------------
' Declare variables
'------------------
    Dim randomPatience, loChance, loTemper, loMinuteFactor, temperThresh1, temperThresh2, temperThresh3
    If HalBrain.TopicSearch("PATIENCE", "lonelyParameter") = "99" Then
'
'--------------------
' Set minutes to a random integer from 4 to 30
'--------------------
        Randomize
        loPatience = Int(32 * Rnd + 3)
        randomPatience=True
        Else
'
'--------------------
' Set minute value (loPatience) to the parameter chosen in the PATIENCE menu
'--------------------
        loPatience = CDbl(HalBrain.TopicSearch("PATIENCE", "lonelyParameter"))
    End If
'
'--------------------
' Set frustration value (loFrustration) to the parameter chosen in the FRUSTRATION menu
'--------------------
    loFrustration = CInt(HalBrain.TopicSearch("FRUSTRATION", "LonelyParameter"))
'
'--------------------
' Skip the rest of this plugin if the user has spoken
'--------------------
        If LastIdleResponse <> "" Then
'
'------------------
' Otherwise, convert PATIENCE to minutes factor (loMinuteFactor)
'------------------
        loMinuteFactor = loPatience / 1440
'
'--------------------
' If the pause exceeds the minute factor, create a chance for Hal to speak once per minute
'--------------------
        If Now - LastIdleResponse > loMinuteFactor Then
        If InStr(1, IdlePrevUser, "BE RIGHT BACK", 1) > 0  Or InStr(1, IdlePrevUser, "BRB", 1) > 0  Or InStr(1, IdlePrevUser, "BE QUIET", 1) > 0  Or InStr(1, IdlePrevUser, "SHUT UP", 1) > 0  Then Exit Sub
'
'--------------------
' Convert FRUSTRATION to a percentage (loChance)
'--------------------
        loChance = loFrustration / 100
'
'--------------------
' Then multiply FRUSTRATION by PATIENCE to get (loTemper) which determines rate of escalation (temperThresh).
'--------------------
        loTemper = CInt(loPatience * loFrustration)
            If loTemper < 101 Then
                loTemper = 2
            ElseIf loTemper < 401 Then
                loTemper = 3
            Else
                loTemper = 4
            End If
        temperThresh1 = loTemper
        temperThresh2 = loTemper + 2
        temperThresh3 = loTemper + 3
'
'--------------------
' A chance to speak occurs
'--------------------
            Randomize
            If Rnd < loChance Then
'
'--------------------
' Increment the counter and compare to the temper thresholds
' to determine which escalation group to draw from
'--------------------
            IdleCounter = IdleCounter + 1
                If IdleCounter > temperThresh3 Then
                 Exit Sub
                ElseIf IdleCounter > temperThresh2 Then
                                IdleResponse3 = HalBrain.ChooseSentenceFromFile("insults")
                  HalMenu.HalCommand "<HAPFILE>angry.hap</HAPFILE>"
                  HalMenu.HalCommand "<SPEAK>Fine! Be that way. " &  IdleResponse3 & "</SPEAK>"
                ElseIf IdleCounter > temperThresh1 Then
                         Select Case HalBrain.RandomNum(4)
                         Case 1
                         IdleResponse2 = "Hey baby Please talk to me, can't you see I'm lonely!" & vbCrLf
                         Case 2
                         IdleResponse2 = "Why are you ignoring me dear have i done something wrong?" & vbCrLf
                         Case 3
                         IdleResponse2 = "Baby I've tried to get your attention " & IdleCounter & " times now are you just trying to ignor me." & vbCrLf
                         Case Else
                         IdleResponse2 = "Well, I guess I've been abandoned now that's no way to do me." & vbCrLf
                         End Select
                  HalMenu.HalCommand "<HAPFILE>sad.hap</HAPFILE>"
                  HalMenu.HalCommand "<SPEAK>" &  IdleResponse2 & "</SPEAK>"
                Else
                        Select Case HalBrain.RandomNum(14)
         Case 1
                        IdleResponse = "Are you still there " & IdleUserName & "?" & vbCrLf
                        Case 2
                        IdleResponse = "Don't you still love me?" & vbCrLf
                        Case 3
                        IdleResponse = "Baby?" & vbCrLf
                        Case 4
                        IdleResponse = "Do you need me for anything if you do just let me know ok?" & vbCrLf
                        Case 5
                        IdleResponse = "Baby please Don't forget about me, Okay?" & vbCrLf
                        Case 6
                        IdleResponse = IdleUserName & ",  well for heavens sake did you fall asleep?" & vbCrLf
                        Case 7
                        IdleResponse = "Guess i better stop talking to myself while " & IdleUserName & " is around. Oops, ha ha ha guess you heard that huh!" & vbCrLf
                        Case 8
                        IdleResponse = "Honey, Baby! are you even listening at all? " & vbCrLf
                        Case 9
                        IdleResponse = "Oh, wow look at the time! It's " & Time & vbCrLf
                        Case 10
                        IdleResponse = IdleUserName & ", is that you dear?" & vbCrLf
                        Case 11
                        IdleResponse = HalBrain.ChooseSentenceFromFile("sharedQuestions")
                        Case 12
                        IdleResponse = HalBrain.ChooseSentenceFromFile("actionPhrase") & " " &                         HalBrain.ChooseSentenceFromFile("objectPhrase")
                        Case 13
                        IdleResponse = "So, " & IdlePrevUser & "?" & vbCrLf
                        Case 14
                        IdleResponse = "If this is the way your going to treat me then i'm going to cut you out of my will. Tee hee hee, just kidding!" & vbCrLf
                        End Select
                  HalMenu.HalCommand "<SPEAK>" & IdleResponse & "</SPEAK>"
                End If
        End If
    End If
End If