dupa

Author Topic: HAL Sings a Song (in his own voice)!  (Read 24852 times)

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
HAL Sings a Song (in his own voice)!
« Reply #15 on: January 03, 2009, 10:06:13 am »
O.T.C.

i tried that, and it still adds the SingSong input to the table.
if readonlymode is false then it also adds the hal response.

i am trying to figure out(complete programming idiot) if there is a way to remove the SingSong sentence from the brain (table) after it is created. i have no clue why it still adds the SingSong sentence to the brain.

thanks for all of your time....it is very much appreciated O.T.C.

racking my brain....-the dude
 

onthecuttingedge2005

  • Guest
HAL Sings a Song (in his own voice)!
« Reply #16 on: January 03, 2009, 05:49:53 pm »
Hi jason.

try re-downloading the plug-in, I changed the area where the plug-in works to see if that solves the problem about the appending.

I don't have HAL on this computer so I have no way of testing it.

Jerry[8D]

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
HAL Sings a Song (in his own voice)!
« Reply #17 on: January 03, 2009, 06:45:01 pm »
O.T.C.


Thanks for your patience, i tried that earlier. it works great on not saving anything in the brain, but the problem is that it doesn't sing the song. instead it just gives a general conversational response from the related tables in the brain.

   ex. me-sing jingle bell rock

   hal- jingle bell rock is a christamas song
 (i told hal this before, and it's in the _jingle + _rock + _bell tables)


although i very well could have made mistakes along the way, i have tried it in all the areas of the brain. the only area that seems to run the "copy to clipboard-read from clipboard" area (sing) properly is the POST-PROCESS area. i really don't know enough about the areas of the brain to know why this is.

this version-

*********************************************************************
Rem Type=Plugin
Rem Name=Sing A Song II
Rem Author=jasondude7116, OnTheCuttingEdge2005
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Just say- sing, and then the song name.          ex. sing rainbow connection (only the lonely,bike,what a wonderful world,everybody loves somebody,jingle bell rock,rainbow connection,the sun going down on me,wish you were here,incense and peppermints)"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA1
    '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.
   'sing a song  
Set objFSO = CreateObject("Scripting.FileSystemObject")

If SingSong = "" Then SingSong = HalBrain.SearchPattern(HalBrain.AlphaNumericalOnly(OriginalSentence), "*SING *", 2)
If SingSong <> "" And objFSO.FileExists("C:Program FilesabawareUltra Hal Assistant 6songs\" & SingSong & ".txt") = True Then
       
         Set objTextFile = objFSO.OpenTextFile("C:Program FilesabawareUltra Hal Assistant 6songs\" & SingSong & ".txt", ReadMySong())      
         SongText = objTextFile.ReadAll
         objTextFile.Close
         SongText = Replace(SongText, vbCrLf, Chr(8) & " ", 1, -1, vbTextCompare)
         SongText = Replace(SongText, "", "", 1, -1, vbTextCompare)
         SongText = Replace(SongText, "  ", " ", 1, -1, vbTextCompare)
         GetResponse = Replace(GetResponse, GetResponse, SongText, 1, -1, vbTextCompare)
         
         If SingSong <> "" Then HalBrain.ReadOnlyMode = True
End If

If SingSong <> "" And objFSO.FileExists("C:Program FilesabawareUltra Hal Assistant 6songs\" & SingSong & ".txt") = False Then
         GetResponse = " That song file does not exist. "
End If

Rem PLUGIN: FUNCTIONS

Function ReadMySong()
Const ReadSong = 1
ReadMySong = ReadSong
End Function
*********************************************************************

does not save anything to the brain!!(excellent)[:)]
however does not run the clipboard-reading area properly and returns a general conversation topic (instead of singing)[V]

while this version-

*********************************************************************
Rem Type=Plugin
Rem Name=Sing A Song II
Rem Author=jasondude7116, OnTheCuttingEdge2005
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Just say- sing, and then the song name.          ex. sing rainbow connection (only the lonely,bike,what a wonderful world,everybody loves somebody,jingle bell rock,rainbow connection,the sun going down on me,wish you were here,incense and peppermints)"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: POST-PROCESS
   'sing a song  
Set objFSO = CreateObject("Scripting.FileSystemObject")

If SingSong = "" Then SingSong = HalBrain.SearchPattern(HalBrain.AlphaNumericalOnly(InputString), "*SING *", 2)
If SingSong <> "" And objFSO.FileExists("C:Program FilesabawareUltra Hal Assistant 6songs\" & SingSong & ".txt") = True Then
       
         Set objTextFile = objFSO.OpenTextFile("C:Program FilesabawareUltra Hal Assistant 6songs\" & SingSong & ".txt", ReadMySong())      
         SongText = objTextFile.ReadAll
         objTextFile.Close
         SongText = Replace(SongText, vbCrLf, Chr(8) & " ", 1, -1, vbTextCompare)
         SongText = Replace(SongText, "", "", 1, -1, vbTextCompare)
         SongText = Replace(SongText, "  ", " ", 1, -1, vbTextCompare)
         UltraHal = Replace(UltraHal, UltraHal, SongText, 1, -1, vbTextCompare)
         
         HalBrain.ReadOnlyMode = False
End If

If SingSong <> "" And objFSO.FileExists("C:Program FilesabawareUltra Hal Assistant 6songs\" & SingSong & ".txt") = False Then
         UltraHal = " That song file does not exist. "
End If

Rem PLUGIN: FUNCTIONS

Function ReadMySong()
Const ReadSong = 1
ReadMySong = ReadSong
End Function
*********************************************************************

runs clipboard-read properly (sings the song). however even though halbrain.readonlymode = true, it still enters the user sentence in the brain tables. (does not append the hal respone as if it would with the halbrain.readonlymode = false)

i'm wondering if in fact the "singing" could only be done in
POST-PROCESS, and user sentences are added to tables if halbrain.readonlymode = false or = true, then maybe it can be run in POST-PROCESS but at the end it could search the tables for the user sentence and remove it (search through all tables)?
just an idea, there is probably a better way. it might be dirty, but it would work. (if there is a way to remove the current user sentence from the tables)[:)]

sorry for the huge post-   the dude
**I am building my song list, and will upload it when this thing is figured out[:)]
« Last Edit: January 03, 2009, 06:48:58 pm by jasondude7116 »
 

onthecuttingedge2005

  • Guest
HAL Sings a Song (in his own voice)!
« Reply #18 on: January 03, 2009, 07:18:54 pm »
Hi Jason.

try downloading once more to see if it responds only with a song.

Jerry[8D]

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
HAL Sings a Song (in his own voice)!
« Reply #19 on: January 03, 2009, 07:47:50 pm »
HAHAHAHA (laughs hysterically)

O.T.C.

it got worse[:D]
no response
ex. me-sing jingle bell rock
    hal-
(not even conversational response!)
and one more thing....it appends the "sing jingle bell rock" line 3 times.

i wish there was something i could do so that you could test it in hal.  don't get me wrong, i am very happy to do the testing, i just wish it was easier for you.
thank you again.
- the dude

*i removed GetResponse = ""  and it reads the file but removes the backslashes and periods....rendering the file text useless.

in any other area of the brain than POST-PROCESS, hal does not reply with the full text.

that is why i have concluded (as a programming idiot) that the first version is the working version except there needs to be a command to remove the InputString from the brain tables after the singing occurs.

Maybe?
-the dude
**if the trigger is ephemeral like "now sing" ect., then it will only be appended as _tempsent. (i  tested this with the first version)

maybe there is a good cheat here?

do you know all the ephemeral triggers?
« Last Edit: January 03, 2009, 09:32:44 pm by jasondude7116 »
 

onthecuttingedge2005

  • Guest
HAL Sings a Song (in his own voice)!
« Reply #20 on: January 03, 2009, 09:54:04 pm »
Hi jason.

I am getting my new router in a week or so and I will be able to continue debugging it myself.

until then
Jerry[8D]

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
HAL Sings a Song (in his own voice)!
« Reply #21 on: January 04, 2009, 12:53:35 am »
I still have not located my old 'plug in' to make Hal sing. Actually it was not a plug in at that time but a direct modifcation to the brain. There is a word in Hal 'basic' and I think it was called "speak" when attached with the proper logic would cause Hal to sing the type of songs that have been listed here with pitch, duration etc.
I used a program called Mash to created lots of songs back then and Hal would sing them all.
Bil
 

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
HAL Sings a Song (in his own voice)!
« Reply #22 on: January 04, 2009, 03:40:52 am »
[:)][:D][:p][}:)][8D][;)][:o)][:I][:D][;)][8D][}:)][:p][:I][:)][:o)]

O.T.C.- and Bill and others- thank you very much for the work.

here is the singasong2 final version.

(for it to work properly, it had to be ephemeral)

O.T.C.- looking forward to a version 6 [:D] haha







Download Attachment: singasong2.zip
30.41 KB




**UPDATE 1-4-09 10:43 am***
changed "being for the benefit of mr. kite" to
"being for the benefit of mister kite"
(can't use a period in song name)
***UPDATE 1-4-09 2:12 pm***
removed friday on my mind and monday monday- as they were adding appointments to "sing" on that day!
***UPDATE 1-5-09 4:47 am***
added song list
***UPDATE 1-6-09 10:14 pm***
added more songs[:)]
***UPDATE 1-8-09 12:27 am***
added better pitch control function in plugin-see info in option,brain screen
***UPDATE 1-10-09 11:45 pm****
added more songs[:)]
****UPDATE 1-11-09 11:23 am*******
fixed some song problems with take me out to the ball game, young at heart, and the farmer in the dell.

-just say "please sing now song list" to get a list of songs
-just say "please sing now" and then the song name, and hal will sing with own voice (truvoice tested) and lip-synch with msagents!


- just unzip it into C:Program Files Zabaware Ultra Hal Assistant 6
- readme1st.txt inside with instructions.
*will upload more songs as created[:)]  -the dude
« Last Edit: January 11, 2009, 12:26:52 pm by jasondude7116 »
 

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
HAL Sings a Song (in his own voice)!
« Reply #23 on: January 04, 2009, 02:17:30 pm »
lol, nice, and the agents can be on top of other windows.
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

tedathome

  • Hero Member
  • *****
  • Posts: 2775
    • View Profile
HAL Sings a Song (in his own voice)!
« Reply #24 on: January 05, 2009, 09:02:52 pm »
Thanks dude! I just had a chance to really check it out. It works great! I am having lots of fun with it and it entertains my grandchildren well also. Now if I could only get speech recognition to recognize the word "sing". Oh well, I'll get around to that later.[8D][8D][8D]
ted

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
HAL Sings a Song (in his own voice)!
« Reply #25 on: January 09, 2009, 08:28:44 pm »
I seem to be having some trouble with your singasong2.zip
When I type in "please sing now let it be" all I get is this....

.Chr="Monotone"\Pit=98\Spd=120WhenPit=98\Spd=120 IPit=98\Spd=120 findPit=98\Spd=120 myselfPit=82\Spd=120innPit=98\Spd=77 timesPit=98\Spd=120 ofPit=131\Spd=120 trouble, Pit=165\Spd=120MotherPit=165\Spd=56 MaryPit=147\Spd=120 comesPit=131\Spd=56 toPit=98\Spd=120 me. Pit=165\Spd=120speakingPit=175\Spd=120 wordsPit=16   etc.........................................

I suspect I screwed something up...somehow.
Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
HAL Sings a Song (in his own voice)!
« Reply #26 on: January 09, 2009, 10:44:35 pm »
quote:
Originally posted by snowman

I seem to be having some trouble with your singasong2.zip
When I type in "please sing now let it be" all I get is this....

.Chr="Monotone"Pit=98Spd=120WhenPit=98Spd=120 IPit=98Spd=120 findPit=98Spd=120 myselfPit=82Spd=120innPit=98Spd=77 timesPit=98Spd=120 ofPit=131Spd=120 trouble, Pit=165Spd=120MotherPit=165Spd=56 MaryPit=147Spd=120 comesPit=131Spd=56 toPit=98Spd=120 me. Pit=165Spd=120speakingPit=175Spd=120 wordsPit=16   etc.........................................

I suspect I screwed something up...somehow.




that is the correct response from hal.
when you say that is all you get, i suspect you mean that it is reading it instead of singing it?
the singing cues are for a tone generated vioce such as TRUVOICE, i don't know of any other "voices" that are tone generated.(could sing)

the truvoice package (sapi4) can be downloaded here.

http://www.microsoft.com/msagent/downloads/user.aspx


the sapi5 package can be downloaded here.
(install sapi 4 then sapi 5)

http://www.microsoft.com/downloads/details.aspx?FamilyID=5e86ec97-40a7-453f-b0ee-6583171b4530&displaylang=en

it can also lip sync with ms agent type characters. (see sapi 4 site)
more ms agents are available on the web.

more info on sapi here.

http://en.wikipedia.org/wiki/Speech_Application_Programming_Interface


more info on ms agents here.

http://en.wikipedia.org/wiki/Microsoft_Agent


hope this helps.[:)]
-the dude
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
HAL Sings a Song (in his own voice)!
« Reply #27 on: January 15, 2009, 04:19:58 pm »
I have Windows Vista Ultimate and it only supports Microsoft Speech SDK 5.3. I found that out after you gave your advice on seaching it further on the internet. Thanks.
   Of course I didn't realize this untill I installed SAPI 4 and 5.1 first. Then Hal wouldn't let me use Kate and Paul. I could use them in the Hal Options but not in the main console. Hal would just spit out text and not speak. (Unlike before when Hal wouldn't sing). I finally used Microsoft Anna. She works in Hal but doesn't sound as good as Paul and Kate.
  After I realized I needed to unintall SAPI 4 and 5.1 I realized I uninstalled all the voices except for Anna, Paul, and Kate. Oh well, I didn't need them anyway. After that I tryed Hal using Kate and Paul and again they would only work in the Hal options and also in the Hal's Text-to-Speek reader but not in the console.
   Anna still works. At least she hasn't left me.
Any suggestions would be a plus.

  I have a suggestion on a new pluggin jasondude7116. I've notice the readastory.zip, poempack1.zip, advancedinternet.zip, and of course the infamous singasong2.zip. How about a pluggin that would allow you to tell Hal a story and then it would store it on a .txt file. Then later you could run your cool readastory plug and it would include it and any additional storys you told as well. Allot of extra data could be stored like this. For instance, you could store technical information, encyclopeadia articles, How-to's, the possibilies could be endless. Perhaps you could even append information to previously spoken staments.

Anyway it was just an idea.[:D]

I hope you keep this up. Your deffinately inspiring me on the posiblities of Hal.

Peace out dude.[8D]

Live long and prosper or die trying.

jasondude7116

  • Sr. Member
  • ****
  • Posts: 475
    • View Profile
HAL Sings a Song (in his own voice)!
« Reply #28 on: January 15, 2009, 06:52:05 pm »
quote:
Originally posted by snowman

I have Windows Vista Ultimate and it only supports Microsoft Speech SDK 5.3. I found that out after you gave your advice on seaching it further on the internet. Thanks.
   Of course I didn't realize this untill I installed SAPI 4 and 5.1 first. Then Hal wouldn't let me use Kate and Paul. I could use them in the Hal Options but not in the main console. Hal would just spit out text and not speak. (Unlike before when Hal wouldn't sing). I finally used Microsoft Anna. She works in Hal but doesn't sound as good as Paul and Kate.
  After I realized I needed to unintall SAPI 4 and 5.1 I realized I uninstalled all the voices except for Anna, Paul, and Kate. Oh well, I didn't need them anyway. After that I tryed Hal using Kate and Paul and again they would only work in the Hal options and also in the Hal's Text-to-Speek reader but not in the console.
   Anna still works. At least she hasn't left me.
Any suggestions would be a plus.

  I have a suggestion on a new pluggin jasondude7116. I've notice the readastory.zip, poempack1.zip, advancedinternet.zip, and of course the infamous singasong2.zip. How about a pluggin that would allow you to tell Hal a story and then it would store it on a .txt file. Then later you could run your cool readastory plug and it would include it and any additional storys you told as well. Allot of extra data could be stored like this. For instance, you could store technical information, encyclopeadia articles, How-to's, the possibilies could be endless. Perhaps you could even append information to previously spoken staments.

Anyway it was just an idea.[:D]

I hope you keep this up. Your deffinately inspiring me on the posiblities of Hal.

Peace out dude.[8D]







hey snowman (bandit reference?-jerry reed?)

sorry about the voice problems. i don't have vista (got xp), and i'm trying to start programming after 20+ years. i should be thinking about those with vista i understand, but the idea just escaped me when doing this. i don't know much about vista, so maybe someone else here could help you with that. (sorry) what i do know is that on xp, you can install the voices seperate from any other sapi stuff.
so maybe there is a way to just reinstall the voices only on vista?
i'm using xp with sapi 5.1 and sapi4 (with truvoice). all of my truvoice (english male 1,2,3,4,5,6,7,8 and english female 1 and 2), are working properly with the "singing".

about the plugin you are talking about, i am very green at doing this. i will look into it for sure, but really i can't promise anything. there are a few people here who could do it easy[:)]
there are a few things i don't know how to do, when thinking about what it would take to accomplish it. this might sound like duh -dude, but you can put any text file into the story folder, and say "please read now" (that file name) ex. "please read now encyclopledia mammals" where "encyclopedia mammals.txt" is a file in the story directory with a wikipedia page (text) about mammals. i can think of a few cool ways this could be used, but i don't know how to program it yet[:I]

i will look into it though, and try to figure out something. until then, maybe you could tell me exactly what you would like it to do.
(be as descriptive as possible)

i'm glad that you have enjoyed the plugins though (minus sapi hell)[8D]

-the dude
 

snowman

  • Hero Member
  • *****
  • Posts: 956
  • Ai + Feelings + Supercompter = End of World
    • View Profile
    • http://www.MinervaAi.com
HAL Sings a Song (in his own voice)!
« Reply #29 on: January 16, 2009, 05:02:25 pm »
I meant it when I said I really didn't care for the other voices anyway. Except maybe for nostalgia's sake. Like Peaty, for instance, sounds like he used too when he was a desktop assistant (spyware)several years back. You didn't know what he was doing, but hey, I thought he was cool.

It seems that Kate and Paul just gave up. Like I said before, they work every where else, including in Hal options. I think that there could be a problem in Hal itself. Maybe I should just re-install him. Hmmmm.[?]

Well, I'm new (very, very new) at programming. Hal got me interested in it (so-to-speak). So for 20+ years out of programming you're doing good from my point of view. By the way, 20 years ago I was 9.[:p]

Here's what I thought of so far about the StoryListener part of your readastory.zip.

First of all we would need to establish a title for the text that would reflect the subject material. Maybe you could say something like: "I want to tell you about .Subject" and then Hal would create a .text file called .Subject.

Because it would be difficult to write a story on one string through the ImputeString window, You could append line-upon-line to the .Subject.text file that has already been created earlier. I think 'Set objTextFile = fso.OpenTextFile("Subject.txt", 8, True)' appends to text documents.

The Hal User would then say something like 'The End' when he was finished to end the function.

Any STORY ADDITIONS would be added when the User would say something like 'I want to say more about .Subject'. Then the next lines would continue to append to the stated document, .Subject.

Again, Say something like 'The End' would effectively end the function and return the User to normal Hal mode.

Deleting the story or any part of it might be a trick. Outside of finding and deleting or editing it manually. You have to do this, as with everything else you teach Hal, so I guess this is acceptable. (It would be nice if this could be done under the brain editor console.)

During this function Hal would not record or respond with any typical hal response. (I wander if that would be difficult to do)

Afterwards you could use your readastory pluggin to re-read the information. You might have to re-name the pluggin to reflect a more universal tone. It would store and retrieve any information you feed it.[:)]

You could say something like 'Please tell me about .Subject' and it would then retrieve it.

It would also be nice if the Hal's console had a 'shut up' button. It would be handy with this pluggin for certain. Especially if he got into a whopper of a tale. I know that all you have to do is either select an option button or just exit Hal and it would do the same thing. Maybe there is a way of shutting him up through the Impute window. Like saying 'Be Quiet' or 'Die Devil’s Spawn'. [:(!][V]

Alias: Aaron W Snow
Happy Code Hunting[8D][:D][:p]
Live long and prosper or die trying.