dupa

Author Topic: HAL responding to its name only  (Read 4767 times)

gregoryg

  • Newbie
  • *
  • Posts: 9
    • View Profile
HAL responding to its name only
« on: October 20, 2004, 02:09:12 pm »
Hello,

Can I make HAL to respond only when it's spoken to? This would be of great help when talking to it using a microphone.

Thanks
Giga
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3862
    • View Profile
HAL responding to its name only
« Reply #1 on: October 20, 2004, 03:55:58 pm »
Gregory,

You are probably using a Hal brain with an auto idle response.
If this is the case, you'll have to go into the brain editor
and remark out those lines (simply insert an ' in front of each
line of text.)

The auto-idle section can be found after the 'PROCESS: INITIALIZE VARIABLES AS INTEGERS section of the brain.

EX: note the apostrophe at the beginning.
' If Autoidler < 10 Then GetResponse = "Hello, is anyone there?"

You can also delete the section regarding the auto-idle response
as you see fit. Just be careful before deleting and ALWAYS MAKE A
COPY OF THE BRAIN FIRST, then rename it just in case of a mishap.

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

- Art -

gregoryg

  • Newbie
  • *
  • Posts: 9
    • View Profile
HAL responding to its name only
« Reply #2 on: October 21, 2004, 06:06:35 am »
Sorry for not explaining myself correctly. What I meant was whether I can trigger HAL's responses only when I say a magic word (Merlin or HAL for example)?

Currently, if mic is ON, HAL is constantly picking up background noises. I'm wondering if there is a way to make HAL respond only when my sentences start in a predefined way. For instance:
1) Merlin, can you help me? => Is processed
2) Can you help me? => Is discarded

Thanks a lot
Giga
 

Rich_A

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
HAL responding to its name only
« Reply #3 on: October 24, 2004, 03:11:39 pm »
Hello gregoryg,
Yes, I think Hal has been programmed by other people to respond to certain customized commands by stating his name at the beginning of a sentence...but no, I have never seen it done for automatically toggling the mic on and off or for filtering out all sound except for when his name is stated.

The "Hal {command}" format has been mentioned in other threads within this forum regarding Home Automation and ER1. But from what I can remember no one has designed an automatic mic toggle function. To do this the mic would have to always be on and Hal would have to be programmed to automatically switch the mic off at the moment a sentence is inputted/accepted and then Hal would have to automatically switch the mic back on after he finishes stating a sentence/response. That might sound easy to do but if it was so easy then someone would of already done it by now. I have never seen this reported to be done by anybody.

One possible approach to do this would be to take the same code used to toggle the mic manually and then modifying it for automation and then incorporating it into Hal's program. However, I still think that it is not an easy thing to do! This might even be something that only the programmers at Zabaware are capable of doing because of Hal program licenses and permissions but I'm not sure about that either. All I know is that it would be really good if Hal could be modified to work this way. I have to agree, having a conversation with Hal without manually toggling the mic would make it seem to be much more realistic and interactive.
Best Regards,
Rich_A
 

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1472
    • View Profile
    • http://www.zabaware.com
HAL responding to its name only
« Reply #4 on: October 24, 2004, 05:26:46 pm »
Hal actually does automatically toggle the microphone when it is speaking depending on the character chosen. If you use a 3D Character (Haptek) or a Detachable Character (MSAgent) then the microphone is always on. If you use a 2D character that is not detachable then Hal will turn off the microphone when Hal is speaking and turn it back on when Hal is done speaking.

Unfortunetely because Zabaware uses the Haptek and MSAgent characters as components under license, I cannot easily get into the source code to get these characters to report back when they are done speaking so that the microphone can be turne on.

So if having the microphone toggle automatically is more important to you than a natural looking 3D character then choose a generic 2D character.
Robert Medeksza

gregoryg

  • Newbie
  • *
  • Posts: 9
    • View Profile
HAL responding to its name only
« Reply #5 on: October 25, 2004, 11:05:35 am »
I've tried 2D non-detachable character called Julia and the behavior is the same. I say something and when Julia answers, HAL starts to speak to itself...

Do I have to do anything special to enable microphone automatic toggle?

Thanks
Giga
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
HAL responding to its name only
« Reply #6 on: October 25, 2004, 11:51:28 am »
Gregory
If you go back and search some of the past post you will find just as Art mentioned to you the necessary code changes to make how respond only when his name proceeds the command. One he responds to that item he will ignore everything else until he hears his named once again.
I forget who posted this change but it was in response to a quest that I and others had in controlling our robots the ER1's. Seems to work just fine for now.
Bill
 

gregoryg

  • Newbie
  • *
  • Posts: 9
    • View Profile
HAL responding to its name only
« Reply #7 on: October 26, 2004, 02:51:34 pm »
I've searched the archives and found the way to make HAL respond only when it's spoken. It's a very simple code (thanks ER1 guys! - I'm getting more familiar with VB now [:D]).

However, mic-speaker-mic loops still occur for me. It's less critical when using the above technique, but I wonder what's wrong with my configuration if this feature is working for others.

BTW, the last topic is discussed under "Prevent HAL from listening when it is talking" - any ideas???

Giga
 

Rich_A

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
HAL responding to its name only
« Reply #8 on: October 26, 2004, 11:49:52 pm »
Hello Greg,
On my computer I tried out all the 2D characters that are supposed to auto-toggle the mic. For me some 2D characters worked better than others, but in general they all stink! I would say that there is nothing wrong with the way you have things setup on your computer, except for maybe tweaking out your mic and speech settings some more, but that is all just a guess! My settings are all tweaked out but the 2D character auto-toggle only worked about half the time, if even that! Most of the time when conversing, the 2D characters would automatically turn the mic back on just a little bit too soon, which would result in the tail-end of their response being tagged on to the beginning of my next voice input. They are auto-toggling the mic, but just not very well, the timing is slightly off. However, I usually don't have any sort of problem like this when manually toggling the mic with any kind of character. It's like Bill said, just use the "Hal {Command}" format to filter sound if you don't want to toggle the mic manually for any of the characters whether they are 2D or not! And I guess that's as good as it gets for now!
Good Luck,
Rich_A
 

gregoryg

  • Newbie
  • *
  • Posts: 9
    • View Profile
HAL responding to its name only
« Reply #9 on: October 27, 2004, 03:12:13 am »
Hello Richard,
I would completely agree with your analysis. I think, I've played with the mic settings long enough and that didn't change much with regard to the loops.

I understand that for detachable characters it might be a problem to implement this feature correctly as explained in this thread. However, for non-detachable characters this seems not to be a great challenge (please, correct me if I'm wrong).

I wonder why Zabaware don't improve this feature right away? Where does the change lie: in character or HAL code? If there is a technical help required, I'm ready to help investigate this issue.

The main problem here is that they charge money mostly for this voice feature, which is practically unusable as it is delivered.

Thank you All for your help,
Giga
 

HALImprover

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
    • BrianTaylor.me
HAL responding to its name only
« Reply #10 on: October 27, 2004, 03:15:58 am »
To Mr. M:

 The Haptek SDK gives an example of detecting when the GUI is speaking (making sound). You can query the TTS engine to see if sound is being made. In the example, the program checks if the sound started then waits for it to finish, so that input is ignored while sound is being made by the TTS engine. You could easily implement this so that Hal would only listen when he is done speaking.

 Just a suggestion.[:)]
Living life with a loving heart, peaceful mind, and bold spirit.

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1472
    • View Profile
    • http://www.zabaware.com
HAL responding to its name only
« Reply #11 on: October 27, 2004, 09:30:42 am »
Thank you, I'll be sure to change that in the next release.

quote:
Originally posted by HALImprover

To Mr. M:

 The Haptek SDK gives an example of detecting when the GUI is speaking (making sound). You can query the TTS engine to see if sound is being made. In the example, the program checks if the sound started then waits for it to finish, so that input is ignored while sound is being made by the TTS engine. You could easily implement this so that Hal would only listen when he is done speaking.

 Just a suggestion.[:)]

Robert Medeksza