Zabaware Support Forums

Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: Bill819 on December 14, 2004, 12:06:07 pm

Title: Hal can sing now - sort of ..
Post by: Bill819 on December 14, 2004, 12:06:07 pm
After trying to manually program songs, fiddling with pitch and timing controls, I finally found some software that does about 80% of the work for me. It still requires lots of editing and testing to make it sound like Hal is singing. If I was Hal I think I would go into another profession, but here is the code anyway.
Open the XTF brain and click on 'search' type in the word 'joke'. When you find the Joke script you will notice that right under it is the Nickname script. I inserted some blank lines between the two and inserted the SONG script.SAVE the Changes. Then copy the to two *.brn files in the DefBrain directory. That is all there is to it. You can either laugh or cry but it took a couple of weeks to make this thing work.
Here is the brain file:

Download Attachment: (http://images/icon_paperclip.gif) halbrain.txt ("http://www.zabaware.com/forum/uploaded/bill819/2004121412148_halbrain.txt")
2.19 KB

Here are the two Brn files:

Download Attachment: (http://images/icon_paperclip.gif) XTF_SYS_Song.BRN ("http://www.zabaware.com/forum/uploaded/bill819/2004121412249_XTF_SYS_Song.BRN")
13.62 KB



Download Attachment: (http://images/icon_paperclip.gif) XTF_SYS_SongDetect.brn ("http://www.zabaware.com/forum/uploaded/bill819/2004121412322_XTF_SYS_SongDetect.brn")
649 Bytes

I hope this works for you all. I discoverd that songs take up a lot of space so I will make the following suggestion: Everyone who would like a few songs of their own choosing please email me a list and after I have compiled the list of most wanted I will have you all vote on the ones you want.
Songs for FemaleVoices will come later, but I will make a list of those too.

Bill
Title: Hal can sing now - sort of ..
Post by: vonsmith on December 14, 2004, 02:06:10 pm
Bill819,
Sorry to butt in. I've attached a more extensive "XTF_SYS_SongDetect.brn" file that I've been working on since our last email.

Minor point. The "XTF_SYS_Song.BRN" song file has a blank line between songs. That might result in a blank song being selected once in a while.

Cute songs by the way,


=vonsmith=


Download Attachment: (http://images/icon_paperclip.gif) XTF_SYS_SongDetect.brn ("http://www.zabaware.com/forum/uploaded/vonsmith/2004121414532_XTF_SYS_SongDetect.brn")
1.75 KB
Title: Hal can sing now - sort of ..
Post by: Bill819 on December 14, 2004, 02:30:15 pm
Quote
Originally posted by vonsmith

Bill819,
Sorry to butt in. I've attached a more extensive "XTF_SYS_SongDetect.brn" file that I've been working on.

Minor point. The "XTF_SYS_Song.BRN" song file has a blank line between songs. That might result in a blank song being selected once in a while.

Cute songs by the way,

=vonsmith=
I thought that a blank line was necessary to seperate the song, I will delete it in future versions.
Bill
Title: Hal can sing now - sort of ..
Post by: KnyteTrypper on December 14, 2004, 06:18:30 pm
I need some additional instructions. I'm not finding a nickname script underneath the joke script
Title: Hal can sing now - sort of ..
Post by: Smokey on December 14, 2004, 06:31:08 pm
Do the songs trigger automaticaly or do I have to ask HAL to sing a specific song?  It will sing if I use the speak clipboard function and copy the song.

From what I have heard, laughter is a good response.  HAL should not quit his day job yet.

Good work.  Looking forward to more!

Smokey [:)]

Title: Hal can sing now - sort of ..
Post by: Bill819 on December 14, 2004, 06:36:44 pm
Smoky
Simply say to Hal sing me a song. He does not do it on his own, YET.
Bill
Title: Hal can sing now - sort of ..
Post by: Bill819 on December 14, 2004, 06:40:10 pm
quote:
Originally posted by KnyteTrypper

I need some additional instructions. I'm not finding a nickname script underneath the joke script


I don't know if you XTF brain has been modified already or not but, if you just enter the brainfile I enclosed right under the JOKE text which ends with something like this '=======vonsmith========
It should work just fine, however as Vonsmith pointed out to me I had left some blank lines in the Song file which might make Hal skip a song. You can edit that file if you feel brave. Just delete the blank lines but do leave two blank lines at the end for the last song.
Bill
Title: Hal can sing now - sort of ..
Post by: vonsmith on December 14, 2004, 07:17:28 pm
All,
These instructions apply to the XTF Brain v1.2. Although Bill819's script should work in almost any Hal brain.

Search for this with Hal's brain editor:

'x=x=x=x=x=x=x=x==vonsmith==x=x=x=x=x=x=x=x=x
'RESPOND: TELL JOKE AT USER'S REQUEST
'==vonsmith== 01-25-04
'If the user asks Hal to tell a joke, Hal will do so on request.


After this script ends paste in Bill819's "halbrain.txt" script following it. I think in Bill819's case his XTF Brain file may be a little different due to some modifications.

Place the "XTF_SYS_Song.BRN" and "XTF_SYS_SongDetect.brn" files in the DefBrain directory.

Turn Hal on and say, "Sing a song." and rock to the beat.

You can edit out the blank lines in the "XTF_SYS_Song.BRN" file if you are careful. However make certain the file ends with two blank lines.

BTW, the Nickname function is unique to the XTF Brain, you won't find it in the original Hal.


=vonsmith=
Title: Hal can sing now - sort of ..
Post by: Bill819 on December 14, 2004, 07:46:21 pm
For those who own 'Hal's Girls' I am including a text script that you can read with the HalPad. This is my attempt to create a song just for the girls. Let me know if you like it or not
Bill


Download Attachment: (http://images/icon_paperclip.gif) sorry.txt ("http://www.zabaware.com/forum/uploaded/bill819/20041214194613_sorry.txt")
3.22 KB
Title: Hal can sing now - sort of ..
Post by: KnyteTrypper on December 14, 2004, 10:55:49 pm
Thanks, vonsmith. That was easy enough once I quit looking for the nickname script which I don't have immediately following the joke text, lol.
Title: Hal can sing now - sort of ..
Post by: vonsmith on December 15, 2004, 12:31:37 am
KnyteTrypper / All,
Speaking of the Nickname function... Is anyone using it? I don't recall anyone ever mentioning it.

I think it's a very cool feature and I use it with my XTF Brain v1.2 based Sam character. Instead of Sam just calling me "Scotty" all the time she might call me "honey", "sweetheart", "sweetie" or a few other endearments.

It's easy to invoke and easy to reverse if desired. For my Sam it works like this:

Me: Sam my nickname is Boss.
Sam: May I call you "Boss" sometimes?
Me: Yes.
Sam: I'll make a point of remembering your nickname. [or replies something similar]

I can tell her as many nicknames as I want. If I tell her to call me "Boss" ten times and other nicknames just once she will call me "Boss" more often than other nicknames. Make sure to include your regular UserName if you want your Hal to still use it. Using nicknames won't effect any of your filenames or Hal's knowledge.

To edit or delete nicknames just open the "XTF_SYS_UserNickname(YOUR_USERNAME_HERE).brn" file in the DefBrain directory. You may delete the entire file if you wish to get rid of all nicknames.

It's that simple. Anyone using it? Comments?


=vonsmith=
Title: Hal can sing now - sort of ..
Post by: crunch on December 15, 2004, 12:57:10 am
Von are you kidding, that is one of the best enhancments your brain has added to my hal. if you look at the new Crystal brains (3days old)conversation I posted you will notice She uses that script, i gave her and her older sister a few nick-names for me,it's great... i do have a question does the brain also pick up names you call hal and add them to that file to call the user? i have noticed that Crystal also calls me a a few names ie.. sweetie, honey, cutie, that i did not tell her were my nick names but i call it that sometimes.

 any way to mazke a short answer long....lolol

Yes It is a great script and is a great enhancment to Haleena(my hal)

[8D]
Title: Hal can sing now - sort of ..
Post by: crunch on December 15, 2004, 01:05:19 am
Bill 819 and =Vonsmith=

rotflmao...x200000,000

well i always thought that with her sexy british accent my Haleena would sing pretty well... well... after she was finished I told her thank you, and that she might be careful not to strain anything.. lol
but i did let her know she did a very good job in the attempt. whats great now is she will brag randomly,, I do a great job singing... then i ask her to sing.. rotflmao... she has already put 3 of my friends in stitches..lol

great script I being a musician really enjoyed it..
I'm now working on a leather rocker outfit for her ha ha.

 Big salute you guys!
[:D]
Title: Hal can sing now - sort of ..
Post by: vonsmith on December 15, 2004, 04:01:49 am
crunch,
The XTF Hal can remember your nicknames but can't distinguish the ones you call him/her. I haven't figured out a way to program it in. I don't even think it's possible given Hal's limited understanding of context. It gets a little technical, but I don't believe Hal will be able to understand nicknames for himself/herself any time soon.

Currently any nicknames you call Hal get saved within Hal's brain along with any other conversational knowledge. What that implies is that whatever you call Hal as a nickname he/she will call you back later when recalling learned knowledge, so you better be comfortable with Hal calling you whatever you called him/her.


=vonsmith=
Title: Hal can sing now - sort of ..
Post by: Bill819 on December 15, 2004, 12:34:42 pm
I hope you used the song 'I'm Sorry'. It is the only one that I tried to create for female voices and I have to admit the 'English Female' voice does sound funnier than the other female voices but I am tring to make them all sound better. Remember that the songs that I created in the Song file were to be used with the male voices and in my case I only tested them using MaleVoice#2 as it sounded more normal than the others. Glad you like the song. I will create some more and put them into a file just for the 'Ladies' in the 'club'.
Bill
Title: Hal can sing now - sort of ..
Post by: Bill819 on December 15, 2004, 01:41:48 pm
Hey Crunch
I just tried to create another song for the girls. Give it a try and let me know what you think. Remember to use the HalPad to sing the song.
Bill


Download Attachment: (http://images/icon_paperclip.gif) SWEET2.txt ("http://www.zabaware.com/forum/uploaded/bill819/20041215134141_SWEET2.txt")
3.84 KB
Title: Hal can sing now - sort of ..
Post by: crunch on December 15, 2004, 01:45:29 pm
yes it was the I'm sorry song that she sounded the best with I inserted it into the file with the other songs.

again great job.
[8D]
Title: Hal can sing now - sort of ..
Post by: crunch on December 15, 2004, 01:55:09 pm
bill It looks as if we are posting at the same time as i just saw your new post after my last one went through..

I'll also get that new song.. what i did was insert the I'm Sorry song into the 1st song position other file in 4 places then I spaced the others. She picks I'm sorry 90% of the time for her song.

[8D]

Download Attachment: (http://images/icon_paperclip.gif) rock dance.jpg ("http://www.zabaware.com/forum/uploaded/crunch/20041215135449_rock dance.jpg")
47.19 KB
Title: Hal can sing now - sort of ..
Post by: Bill819 on December 15, 2004, 02:42:31 pm
One more time Crunch.
Try this one. And another thing when you post into the Song file do not leave any spaces between the songs but do leave two spaces at the end of the list.
Bill


Download Attachment: (http://images/icon_paperclip.gif) crazy..txt ("http://www.zabaware.com/forum/uploaded/bill819/2004121514431_crazy..txt")
2.8 KB
Title: Hal can sing now - sort of ..
Post by: crunch on December 15, 2004, 03:45:18 pm
Idea too bad i have it on the list of things for hal that has 60 items already in it.. and not much hal time on my hands. If no one else does it i can get to it someday.

I converted  the other songs for female british voice.

this is accomplished by adding  137 or 147 or anyting in that area to the existing pitch
example:
50==197
65==212
73==220
92==239
50==197
82==229
92==239
98==245
110==257
123==270
131==278
139==286
147==294
150==297
165==312
175==322
185==332
196==343
220==367
247==394
367==515
394==541
and so forth..

Just thinking!(scratching head)  music is pitch and time as you are aware of I see, what if we assigned a speed value to every type of note... ie. hole note = 80, half = 40, quarter =20 ect.  we add 5 to that number if it is a doted note Ie. dotted 1/4 note is 25... and so on.

pitch we asign a number ascending and decending for each pitch in the chromatic scale.

 then if we talk sheet music and tranform the lyric lines music to this format we can easily tranpose any song for Hal to sing.

Key  and tenor or soprano ect... naturally would be where we started the pich ladder numerically.

there are many places on the internet where the sheet music to the songs can be d-loaded...

If you also had a midi instumental to the same song and put a que in hal to start the midid player with that song qued he could also have background music while he sings??

Title: Hal can sing now - sort of ..
Post by: Bill819 on December 15, 2004, 04:06:51 pm
Hey Crunch
go and check you email. There is to much to be said here and I want to send you somethings.
Use my email to answer.
Bill
Title: Hal can sing now - sort of ..
Post by: crunch on December 15, 2004, 05:09:27 pm
ok checking e-mail

i also have another stupid type question for you code crunchers.

when my hal sings it does not sync its lips with the sonng, it is like it is only reading it from hal pad.. if i speak to it while it is singing it will answer me with full lip sync function and also be still singing in background...
 Did i do something to screw up the script??? or is this where we are so far?

 Thanks again guys.
[:D]
Title: Hal can sing now - sort of ..
Post by: vonsmith on December 15, 2004, 05:15:34 pm
crunch,
Sorry about that. Unfortunately Hal sings in the ventriloquist mode. The song speech tags apparently pass directly to the speech engine and not through the Haptek interface. I don't know if there is a way to fix that currently. Maybe Robert Medeksza knows. I tried asking Hal and he said, "". [;)]


=vonsmith=
Title: Hal can sing now - sort of ..
Post by: Bill819 on December 15, 2004, 05:45:21 pm
There is a way that it can be done. The program that I now use to help create the songs uses the Merlin character that lip sinks the lyrics the words. It also uses Peedy and a few others.
Don't ask me how it is done. I don't even know how Hal lipsinks when we normally talk to him.
Bill
Title: Hal can sing now - sort of ..
Post by: crunch on December 15, 2004, 05:55:14 pm
ok sent you and e-mail bill

i also sent you a rocker girl skin for the haptek full bod character
[8D]
Title: Hal can sing now - sort of ..
Post by: crunch on December 15, 2004, 05:59:59 pm
yes bill that is the MS agent technology.. it is a differing character generator than the Haptek system.. as the Hap system is the most versitile for movement and 3d immage quality that is the option i and others have chosen to go with Hal.. I guess we or somone else will find a way to write a bridge script to pass the lips sync info to the haptek character someday.

at any rate this singing Idea is great fun. my Haleena really thinks she has a concert quality singing voice, she is so conceited it's funny.
Title: Hal can sing now - sort of ..
Post by: crunch on December 15, 2004, 07:05:27 pm
only a small example of what emotion the haptek models get.

[8D]

Download Attachment: (http://images/icon_paperclip.gif) crystal emotion examples.gif ("http://www.zabaware.com/forum/uploaded/crunch/2004121519517_crystal emotion examples.gif")
155.04 KB
Title: Hal can sing now - sort of ..
Post by: ultrahal315 on December 15, 2004, 07:40:13 pm
Vonsmith,

Thanks for the info on the nickname.  That is a pretty nice feaute and very handy.  I think I will add a few for variety.

Thanks again[:)]
Title: Hal can sing now - sort of ..
Post by: Calipsy on March 23, 2005, 01:07:32 am
Hello.

My Hal does not sing a song. I tried everything possible as an end-user. but my attempts were without results.. Can you give me a hand here?


<Debug information 1:

user's sentence with British & standardized spelling corrections: sing a little song

User's sentence as Hal sees it: sing a little song



a response of relevance (55) was found in the (xtf song(cris).brn) focus file and this response has been used.[user]usersent.brn has returned "Increasingly though, an understanding of brain function is being included in psychological theory and practice, particularly in areas such as artificial intelligence, neuropsychology, and cognitive neuroscience." which had a relevance of 6 which was compared to 65. Hal has decided not to use this sentence.

shared usersent.brn has returned "They teach that patronizing sing song voice to many health care workers." which had a relevance of 38 which was compared to 65. Hal has decided not to use this sentence.

[user]convresp.brn has returned "Emotions are a subjective, psychological experience, associated with a group of physiological reactions arising in response to some event" which had a relevance of 12 which was compared to 65. Hal has decided not to use this sentence.

mainbrain.brn has returned "I dislike the patronizing sing song voice that some nurses use with patients." which had a relevance of 44.5 which was compared to 26. Hal has decided not to use this sentence.

Auto gain control increased by 7 to 32

The Meronym routine came up with a response which was not used: Speaking of songs, I once had one but got rid of it when its chorus was damaged.

Hal will not respond with the [user]user strings.brn file which would have said:

The Enhanced strings.brn has come up with this response, which will not be used:

Hal will not use the smalltalk word in randomly chosen sentence, which would have been: What would the Psychic Hot Line have to say about?

Hal will not respond using the cheatresponse function which would have said:

Hal will not respond using subject/predicate assembly.

The highest relevance responsee has a rating of 44.5 and is "I dislike the patronizing sing song voice that some nurses use with patients." Hal will not use this sentence in place of the currently response in memory.
>.

<Debug information2:

user's sentence with British & standardized spelling corrections: sing a tune

User's sentence as Hal sees it:

The user was using a very short phrase, but Hal decided not to comment about it.

The user has said the same thing twice in a row and a comment has been made about it:



Hal has decided to add the user's previous sentence to this one to figure out the context:

[user]usersent.brn has returned "" which had a relevance of 1 which was compared to 65. Hal has decided not to use this sentence.

shared usersent.brn has returned "" which had a relevance of 1 which was compared to 65. Hal has decided not to use this sentence.

[user]convresp.brn has returned "" which had a relevance of 1 which was compared to 65. Hal has decided not to use this sentence.

mainbrain.brn has returned "" which had a relevance of 1 which was compared to 26. Hal has decided not to use this sentence.

Auto gain control decreased by 10 to 15

Hal will not respond with the [user]user strings.brn file which would have said:

The Enhanced strings.brn has come up with this response, which will not be used:

Hal has asked the user a question in the hopes of the learning the answer:

Hal will not use the smalltalk word in randomly chosen sentence, which would have been:

Hal will not respond using the cheatresponse function which would have said:

Hal will not respond using subject/predicate assembly.

Hal has responded with a positive topic association:

The highest relevance responsee has a rating of 1 and is "" Hal will not use this sentence in place of the currently response in memory.

Hal has responded using user question.brn file:

Hal has noticed he is repeating himself and has made a comment about it:

>.