Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - knight2000

Pages: [1] 2 3 ... 9
1
Ultra Hal Assistant / Re: Hal on Linux?
« on: April 22, 2019, 12:06:49 am »
 :o

2
Ultra Hal Assistant / Hal on Linux?
« on: April 20, 2019, 06:45:41 pm »
Hi guys! Will Hal run on Linux?

3
I would like to control Hal's mic after Hal has started up using the command line. The following code works fine if Hal is not running

"C:\Program Files (x86)\Zabaware\Ultra Hal 7\UltraHal7.exe" <SHOWHAL><MICON>"

Hal i will start with his mic enabled

However if Hal is already running he ignores any command line arguments.

Is there a way around this?

4
Ultra Hal Assistant / Re: Tell Hal to stop listening?
« on: March 27, 2019, 10:08:12 am »
Thats a cool utility, but my problem is that once Hal is running, the command line args do not work. If i exit hal then run my python program, Hal starts up with the mic enabled. Sorry, i probably should have said that before. So even if i pull up a command prompt and execute C:\Program Files (x86)\Zabaware\Ultra Hal 7\UltraHal7.exe <SHOWHAL><MICON> while Hal is already running, his mic doesn't come on. I have to exit Hal completely in order for that command to work.


5
Ultra Hal Assistant / Re: Tell Hal to stop listening?
« on: March 26, 2019, 10:22:15 am »
Im using the vrMP3 plugin but i altered the code to grab the length of the song. See below

Code: [Select]
If vrToPlay <> "" Then
   If HalBrain.CheckTableExistence("vrMp3") = False Then
        GetResponse = "I dont have that song on file. "
   Else
     vrNameToPlay = HalBrain.QABrain(vrToPlay, "vrMp3", 0)
     If vrNameToPlay <> "" Then
        GetResponse = "Here you go! "
'HalCommands = HalCommands & "<MICOFF>"
Set objWSHShell = CreateObject("WScript.Shell")
    objWSHShell.Run(""""& vrNameToPlay &"""")
pos = InStrRev(vrNameToPlay, "\") +1
file = Mid(vrNameToPlay, pos)
Const LENGTH = 27
Dim oShell  : Set oShell  = CreateObject("Shell.Application")
Dim oFolder : Set oFolder = oShell.Namespace("C:\Users\vyaco\Desktop\Hal\music")
Dim oFile : Set oFile = oFolder.ParseName(file)
Dim strLength : strLength = oFolder.GetDetailsOf(oFile, LENGTH)
param1 = "music"
param2 = strLength
objWSHShell.Run hal_commands & param1 & " " & param2
     End If
   End If
   HalBrain.ReadOnlyMode = True
End If

The last line runs the python script and sends params.
Code: [Select]
objWSHShell.Run hal_commands & param1 & " " & param2
This is my python snippet for toggling Hal's mic
Code: [Select]
##PLAY A SONG
if command == "music":
command2 = sys.argv[2]
##Mbox('debug', command + " " + command2, 1)
subprocess.Popen([r'C:\Program Files (x86)\Zabaware\Ultra Hal 7\UltraHal7.exe', '<SHOWHAL><MICOFF>'])
t = command2
h,m,s = re.split(':',t)
print int(datetime.timedelta(hours=int(h),minutes=int(m),seconds=int(s)).total_seconds())
duration = int(datetime.timedelta(hours=int(h),minutes=int(m),seconds=int(s)).total_seconds())
##print command2
voice = open(voice_modulator,"w")
voice.writelines("turnoff")
voice.close()
##Mbox('duration', str(duration), 0)
time.sleep(duration)
voice = open(voice_modulator,"w")
voice.writelines("turnon")
voice.close()
subprocess.Popen([r'C:\Program Files (x86)\Zabaware\Ultra Hal 7\UltraHal7.exe', '<SHOWHAL><MICON>'])

So i need to be able to control Hal's mic via python

6
Ultra Hal Assistant / Re: Tell Hal to stop listening?
« on: March 25, 2019, 06:28:47 pm »
Thats a good plugin but i need to be able to control Hal's mic externally.  Example would be if I tell Hal to play a song i would want Hal to turn off his mic while the song is playing then when the song is over turn his mic back on. I have a python script that will get song's length, i want to be able to use python to execute "Ultrahal.exe <SHOWHAL><MICON>" using the command prompt after the song ends. The problem is if Hal is already open, calling Ultrahal.exe <SHOWHAL><MICON> will only show Hal and not enable his mic :(

Any idea's on how to make something like this work?


7
Ultra Hal Assistant / Re: How to add a timer in Hal script?
« on: March 05, 2019, 02:29:15 pm »
I'll check it out

8
Ultra Hal Assistant / Re: How to add a timer in Hal script?
« on: March 04, 2019, 04:38:38 pm »
Thanks for the reply Art! How does this code constantly check the values. Would this code be wrapped in a loop?

9
Ultra Hal Assistant / How to add a timer in Hal script?
« on: March 04, 2019, 10:15:04 am »
I need to add a countdown timer in a Hal plugin im creating, but it doesn't seem that WScript.Sleep is available within Hals script. Not sure why but i get an object error. Has anyone tried working with timers in Hal's script before? I want something like the following:

WScript.Sleep 5000
HalCommands = HalCommands & "<MICOFF>"

So after 5 seconds turn off Hal's mic.


10
Ultra Hal Assistant / Re: Tell Hal to stop listening?
« on: February 28, 2019, 10:22:28 am »
Thanks for the response! I was hoping there was also a programmatic way of having Hal stop listening but I assume <MICON> and <MICOFF> would work.

11
Ultra Hal Assistant / Tell Hal to stop listening?
« on: February 27, 2019, 10:58:53 am »
Hi Guys,

Is there a command like <MICON> to have Hal stop listening? When I have speech recognition on and i tell Hal to play a song, i'd like him to stop listening, otherwise he responds to the song lyrics haha. If i turn the mic off then i cant turn it back on unless i type it in. I was hoping for some kind of command (function) to execute when i tell Hal to play a song then when the song is done i can say "start listening". Im pretty sure there is something like this already but i'm not sure what it was  :-\

12
Ultra Hal Assistant / Re: Robert - Starting Hal with microphone enabled?
« on: February 27, 2019, 10:41:03 am »
Yes, that will work

13
Ultra Hal Assistant / Re: Robert - Starting Hal with microphone enabled?
« on: February 27, 2019, 09:32:41 am »
Robert gave me the solution for this. Its not something you add to the code, instead you can change the parameters of Hal's shortcut in the "startup" folder to include: <SHOWHAL><MICON>

That worked perfectly! Hal starts up and is listening when my computer boots up. This work great for my application which is installed in a vehicle, its not convenient for me to have to grab the keyboard, go in to the computer and enable Hal.

Thanks Robert!

14
Ultra Hal Assistant / Robert - Starting Hal with microphone enabled?
« on: February 11, 2019, 09:30:48 am »
Hey Robert,

Would it be possible to add a flag in the registry or somewhere that will allow Hal to start with his mic enabled. I'd love to just have my computer boot up and not have to click the mic button on Hal.

15
Yes i tried that and still no luck. I even tried changing to the Microsoft speech engine and it still just minimizes to the tray and the mic is off.

Pages: [1] 2 3 ... 9