Author Topic: How to manage Hal's database?  (Read 13648 times)

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #15 on: August 26, 2017, 11:21:16 am »
Nice plugin! But my goal is to enable Hal and his microphone on startup of windows, this way i wouldn't have to log into the computer and interact with Hal at all. As soon as the the computer would boot up and Hal loads i would be able to give him speech commands. Is this possible without having to touch the source code?

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
Re: How to manage Hal's database?
« Reply #16 on: August 27, 2017, 10:27:28 am »
knight2000, that is strange i never had that specific thing to happen , about hal saying open  , or open chrome as a learned response , it sounds like in the coding it needs a read only command for the command part , others otc2005 might know better on this.

    I thought you was only referring to pre set ( by Robert ) questions and answers ) .
     
 

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #17 on: August 27, 2017, 11:37:07 am »
knight2000, that is strange i never had that specific thing to happen , about hal saying open  , or open chrome as a learned response , it sounds like in the coding it needs a read only command for the command part , others otc2005 might know better on this.

    I thought you was only referring to pre set ( by Robert ) questions and answers ) .
   

Hi Lightspeed.

It was his Auto topic learning that was picking up his commands, in the default HAL commands should be used with HAL's name because when HAL detects its name it set readonlymode function to block learning & bad responses from being saved. so: HAL, Turn off lights. is the correct way of ordering a command.

Jerry

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #18 on: August 27, 2017, 08:59:56 pm »
@lightspeed That was my problem, Hal was auto learning the response. With help from OnTheCuttingEdge i was able to find those responses in Hal's auto learning table. I deleted them and the weird responses are gone.

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #19 on: August 27, 2017, 09:27:29 pm »
Ziggy can Block Save on command both OriginalSentence and InputString, UserSentence & PrevUserSent, I could do this with GetResponse and UltraHal responses but never saw a reason to do so.
A little nugget I made.
just an Idea to share with you.

Jerry 8)
« Last Edit: August 27, 2017, 09:44:50 pm by OnTheCuttingEdge »

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #20 on: August 27, 2017, 09:49:20 pm »
Ok, Is there any other issues that need addressing?

Jerry 8)

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #21 on: August 28, 2017, 12:18:10 am »
@OnTheCuttingEdge The following plugin crashes Hal on start up. I attached the error.

Code: [Select]
'Rem Type=Plugin
'Rem Name=Microphone Auto Loader
'Rem Author=Gerald L. Blakley A.K.A OnTheCuttingEdge2005
'Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Automatically loads Microphone to On at HAL start up."
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: SCRIPT_LOAD
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.

'AUTO LOAD HAL'S MICROPHONE TO ON AT START UP AND SHOW HAL PANEL.
Script_Load = Script_Load & "<SHOWHAL>"
Script_Load = Script_Load & "<MICON>"

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #22 on: August 28, 2017, 10:15:07 am »
@OnTheCuttingEdge Yes if i comment out the<MICON> it works fine. I've had this issue in the past with the <MICON> command. Seems like anytime you try to activate that command it throws that error. Not sure why.

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #23 on: August 28, 2017, 01:54:46 pm »
That error also occurs when I type in <MICON> to Hal's textbox.

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #24 on: August 28, 2017, 05:00:27 pm »
That error also occurs when I type in <MICON> to Hal's textbox.

anyone else experience this issue with <MICON> not working?

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #25 on: August 29, 2017, 10:32:12 am »
@OnTheCuttingEdge If i go to Hal's settings > general section and update the plugin to the new script it throws the error I attached,  however if I restart Hal with the new update he throws the same error as before "Run-time error '430'

Maybe hal's interface needs to completely load up before the microphone can be enabled. I remember in a post a while back that the mic would not work until Hals interface loads. In your code it looks like they are both loading at the same time. Could you try adding a time in between <SHOWHAL>Timer<MICON>
« Last Edit: August 29, 2017, 10:45:16 am by knight2000 »

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #26 on: August 29, 2017, 10:58:40 am »
This was the forum I saw before with regards to enabling the mic. You had this issue at one point. do you remember if you got it to work? It was probably before Hal 6.2

Code: [Select]
Unfortunetely <SHOWHAL> is an asynchonous call. It does not wait for Hal's window to finish loading before it runs the next command. And <MICON> requires Hal's window to be completely loaded in order to actually turn the microphone on. Giving the command <SHOWHAL><MICON> at the same time will not turn on the mic since Hal's window doesn't have enough time to load before it tries to turn the mic on.

One solution that I can think of would be to run <SHOWHAL> at startup and <MICON> at some point in the future like maybe in the minute timer. Another possibility worth looking into may be <RESPOND>Turn on the Mic</RESPOND> and you would have to program the Hal Brain to turn on the mic when it receives that command. In theory, the <RESPOND> command will load Hal's window, wait for it to load, and then give that query for Hal to respond to, at which point a <MICON> command could be given to turn the mic on.

Also, command line options for Hal don't need a HalCommands= or anything like that. Just straight HalCommand tags should work fine.


http://www.ultrahal.com/community/index.php?topic=4101.0
« Last Edit: August 29, 2017, 11:05:00 am by knight2000 »

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #27 on: August 29, 2017, 06:07:48 pm »
@OnTheCuttingEdge Thank you for the continued help, however with your latest update hal stays minimized in the taskbar on startup and the mic is not activated. I'm using dragon 13 for my speech recognition on windows 10 64 bit.

onthecuttingedge2005

  • Guest
Re: How to manage Hal's database?
« Reply #28 on: August 29, 2017, 09:11:34 pm »
Well, one last time, lol

Code: [Select]
'Rem Type=Plugin
'Rem Name=Auto ON Microphone
'Rem Author=Gerald L. Blakley A.K.A OnTheCuttingEdge2005
'Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Auto ON Microphone"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: SCRIPT_LOAD
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.

'LETS LAUNCH THE MICROPHONE ON START UP OF WINDOWS.
Script_Load = ShowHal() & Microphone()



Rem PLUGIN: FUNCTIONS
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.

'SHOW HAL'S PANEL FOR MIC COMMAND SCRIPT LOAD.
Function ShowHal()
ShowHal = HalCommands & "<SHOWHAL>"
End Function

'LETS ENGAGE IN THE MICROPHONE ACCESSORY AND SHOW HAL PANEL.
Function Microphone()
Microphone = HalCommands & "<MICON>"
Exit Function
End Function

I can add the Exit Function if it works for you. so you can click HAL off.

Hope it works for you knight.
Good luck.
Jerry
« Last Edit: August 29, 2017, 09:31:09 pm by OnTheCuttingEdge »

knight2000

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: How to manage Hal's database?
« Reply #29 on: August 30, 2017, 10:00:30 am »
@OnTheCuttingEdge you've been more then helpful and I'm sure its something wrong with either my Hal setup or something on my end. I'm just happy that its even possible to have Hal startup with the mic on. I'll figure it out and let you know! Thanks for all the help!