dupa

Author Topic: Help with speaking  (Read 12857 times)

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Help with speaking
« on: September 30, 2003, 04:20:08 pm »
I have gotten Hal to sing and noticed that the only way to change his tempo is with the use of 'commas' and 'periods' is there some other way to cause slight pauses in his speech. If there were, it would make some of the songs sound more real. Also to be able to draw out a word or two would be a great help too, but I do not think that is really possible.
Also, did anyone ever figure out how to make Hal speak on his own. I would like to be able to direct Hal idle time to some special scripts, like songs, misc-talk and things like that when he is not directly responding to spoken commands.
One last thing. I would like to be able to have Hal repeat something when I tell Hal to 'Say hello to someone', possible?

Any help will greately appreciated. Thanks
Bill819
« Last Edit: September 30, 2003, 04:21:34 pm by Bill819 »
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Help with speaking
« Reply #1 on: September 30, 2003, 05:17:21 pm »
If the character voice you have chosen is using the Microsoft SAPI 4 or 5 speech engine then there are some "tags" that can change some aspects of the voice. Unfortunately I don't know of a way to pass the "tags" through Hal to the speech engine.

See this link for some tag info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msagent/spoutput_2v1w.asp

A tag is inserted within the text string. Example: "This is /Pit=4000/ the way to change the pitch of the voice." Anything after the /Pit=4000/ tag is pronounced at a pitch of 4000 Hertz. The double / is to indicate to the speech engine not to pronounce the  or text therein. There are also tags for speed, pause, emphasis and other limited attributes. The emphasis tag /emp/ is sometimes inserted by TTS (Text To Speech) software preceding the end of a sentence ending with a "?" to denote a question. Some of these speech parameters can be set up by opening the 'Speech' applcation in the Windows Control Panel. However there is limited control at that point. Tags were really intended to be used by programmers within there code and not end users.

PLEASE NOTE I HAVE USED / INSTEAD OF THE PROPER BACKSLASH SINCE THE FORUM SOFTWARE DOESN'T PROPERLY DISPLAY THE BACKSLASH CHARACTER.

If you can place tags in Hal's response .brn, but I don't think Hal passes those tags on to the speech engine. Try it out and let us know if it works.

The other problem is different speech engines and voice technologies only support certain tags or fundamentally cannot change parameters like pitch due to the voice technology used. Other engines may use proprietary tags. Some tags switch the engine to different pronounciation modes for reading email, addresses or dollar amounts. A good speech engine does other things too like interpreting the context of certain words. For example: Should "St." in a sentence by pronounced as "street" or as "saint". A good speech engine would look at the rest of the sentence for clues or assume pronounciation based on the mode that it is it, i.e. Address mode.

With all of that said... Good luck. I would dearly love to give Hal some inflection, emphasis, prosody or a good singing voice. I suspect that Microsoft may move their Agent and voice support over into their .NET environment in the near future and support SAPI only as a legacy. That's just a guess at this point.

Have fun. Let us know how the voice experimentation comes along.

= vonsmith =
« Last Edit: September 30, 2003, 05:24:53 pm by vonsmith »
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Help with speaking
« Reply #2 on: September 30, 2003, 07:18:18 pm »
Quote
Originally posted by vonsmith
Thanks for the reply. That is more than I asked for. I discovered that the insertion of a comma makes Hal pause for a split second and the insertion of a period makes Hal pause for 2 split seconds. All I was originally looking for was longer pauses at this time. I think I will try 2 or more periods in a row and see if that works.
I will log onto the site that you spoke of though and see if I can make any of those changes too.
Bill819
 

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
Help with speaking
« Reply #3 on: October 01, 2003, 02:40:29 pm »
Attached is a text file you can open with Hal's HalPad. Set Hal's voice to any of the TruVoice voices installed on your computer. Then have Hal speak the document and you can hear tone-deaf Hal try to sing Happy Birthday.

Download Attachment: birthday.txt
769 Bytes
Robert Medeksza

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Help with speaking
« Reply #4 on: October 06, 2003, 12:11:03 pm »
Thanks for the suggestion. It worked just fine at work with the FREE version of Hal,but when I got home to the Commercial version that I bought, the HalPad won't read the birthday.txt and thus won't sing.
I am puzzeled.
Bill819
 

trallyus

  • Newbie
  • *
  • Posts: 5
    • View Profile
Help with speaking
« Reply #5 on: October 14, 2003, 08:11:56 am »
Bill819,
It must be your copy of the program as it worked fine for me on the paid version of Ultra Hal 4.5. What I did was open up the happy birthday text file with internet explorer, then I hit CTRL+a to select all the text and then hit CTRL+c to copy all the text and opened up halpad and clicked it once and hit CTRL+v and pressed the microphone to hear him sing.

Hope that helps.
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Help with speaking
« Reply #6 on: October 14, 2003, 11:20:55 am »
I copied the file from my desktop at work where it worked fine onto my laptop at home. No matter what I tried the HalPad would not read the file. I also had a printed version that I made at work so I could study the codes better. After several attempts at trying to get the HalPad to read the file, I opened up HalPad and hand type into the Pad all of the commands of the song. Once I did that I clicked on the Speak button and the HalPad sang Happy Birthday. Thinking that I now had solved the problem I used the HalPad to save the program with a different name. Once I was convinces that it saved O.K., I closed the HalPad and then reopened it once again. I clicked on the song file to open and all I got was a blank screen. The HalPad on my laptop at home will not read this file and I don't know why. I am using the version 4.5 at home. This remains a mystery to me and it hampers me in developing new songs for Hal.
Bill819
 

cutitupwiz

  • Newbie
  • *
  • Posts: 3
    • View Profile
Help with speaking
« Reply #7 on: October 16, 2003, 01:54:27 pm »
Bill,
The birthday script worked for me too, after I fiddled with the volume and controls on my compaq laptop. It seems the cut and past method might have had something to do with it, as it did not seem to want to work, when I opened it using the halpad menu selection. It is very cute to hear Hal sing.
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Help with speaking
« Reply #8 on: December 03, 2004, 07:09:55 pm »
Bill819,
Below is my original posting about Hal singing. I emailed you the updated song files you emailed me about. The problem I mention below about not being able to pass pitch, speed and other tags through Hal's brain is still unsolved. Hal can speak a song, but not sing it, except in Halpad. Even if you select a song with tags out of a .brn file you still need to pass it back to Hal's main program through the GetResponse variable. The main program won't accept the tags.

If you want Hal to sing via a .brn file then Robert Medeksza is going to have to change something in the main part of Hal's program unless there is a "special" command or syntax I don't know about.

Robert Medeksza, any comments here?


=vonsmith=


quote:
Originally posted by vonsmith

If the character voice you have chosen is using the Microsoft SAPI 4 or 5 speech engine then there are some "tags" that can change some aspects of the voice. Unfortunately I don't know of a way to pass the "tags" through Hal to the speech engine.

See this link for some tag info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msagent/spoutput_2v1w.asp

A tag is inserted within the text string. Example: "This is /Pit=4000/ the way to change the pitch of the voice." Anything after the /Pit=4000/ tag is pronounced at a pitch of 4000 Hertz. The double / is to indicate to the speech engine not to pronounce the  or text therein. There are also tags for speed, pause, emphasis and other limited attributes. The emphasis tag /emp/ is sometimes inserted by TTS (Text To Speech) software preceding the end of a sentence ending with a "?" to denote a question. Some of these speech parameters can be set up by opening the 'Speech' applcation in the Windows Control Panel. However there is limited control at that point. Tags were really intended to be used by programmers within there code and not end users.

PLEASE NOTE I HAVE USED / INSTEAD OF THE PROPER BACKSLASH SINCE THE FORUM SOFTWARE DOESN'T PROPERLY DISPLAY THE BACKSLASH CHARACTER.

If you can place tags in Hal's response .brn, but I don't think Hal passes those tags on to the speech engine. Try it out and let us know if it works.

The other problem is different speech engines and voice technologies only support certain tags or fundamentally cannot change parameters like pitch due to the voice technology used. Other engines may use proprietary tags. Some tags switch the engine to different pronounciation modes for reading email, addresses or dollar amounts. A good speech engine does other things too like interpreting the context of certain words. For example: Should "St." in a sentence by pronounced as "street" or as "saint". A good speech engine would look at the rest of the sentence for clues or assume pronounciation based on the mode that it is it, i.e. Address mode.

With all of that said... Good luck. I would dearly love to give Hal some inflection, emphasis, prosody or a good singing voice. I suspect that Microsoft may move their Agent and voice support over into their .NET environment in the near future and support SAPI only as a legacy. That's just a guess at this point.

Have fun. Let us know how the voice experimentation comes along.

= vonsmith =

 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Help with speaking
« Reply #9 on: December 03, 2004, 10:05:29 pm »
VonSmith
I think I solved that problem. IF the first thing that Hal tries to read is a 'tag' it won't work so I typed in the name of the song before the actual song and it seems to work. It just can't start with a tag. Put the Birthday.txt in the Song.brn and then edit it with HalPad and insert 'A birthday song' right before the real song, then try it. It worked for me.
Bill

 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Help with speaking
« Reply #10 on: December 04, 2004, 05:27:39 pm »
Bill819,
Maybe we are talking about two different things. I can have Hal sing the song if I open it in Halpad, but not when Hal reads it in his window. In the latter case Hal gets the song from the XTF_SYS_song.brn file and just reads it like text, including the pitch and speed tags. I already tried adding words in front of the tags.

Please describe exactly how your Hal is singing using the files we exchanged. At this point I'm assuming you are opening the song in Halpad and not relying on asking Hal to "Sing a song please."

Thanks,


=vonsmith=
« Last Edit: December 04, 2004, 05:29:56 pm by vonsmith »
 

HALImprover

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
    • BrianTaylor.me
Help with speaking
« Reply #11 on: December 06, 2004, 03:34:56 am »
Are you trying to get Hal to sing what you set GetResponse to? Try using the <SPEAK> tag to get Hal to sing the output. For an example, try the following addin script;

Download Attachment: SingingAddin.txt
1.13 KB

and add a new folder to the DefBrain directory called "songs" and put the following song files in it;

Download Attachment: kidsongs.txt
2.43 KB

Download Attachment: regular.txt
789 Bytes

Hope this helps [:)]
Living life with a loving heart, peaceful mind, and bold spirit.

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Help with speaking
« Reply #12 on: December 06, 2004, 04:37:54 am »
HALImprover,
Thanks, that is the missing part of the puzzle. The <SPEAK> tags pass the info thru to the speech engine. I tried using the speak tags before but the script would get errors due to the "" marks. I see the problem now. With some minor changes to Bill819's code it should work fine. Very cool.

Bill I'll email you some revised script code tomorrow for you to try out.

Thanks again HALImprover!


=vonsmith=
 

vonsmith

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Help with speaking
« Reply #13 on: December 06, 2004, 03:57:53 pm »
Bill819,
I emailed the updated script and files to you today. It works very well indeed. Check out the script for yourself. I'll include it in the next XTF Brain (v1.4) release. After checking it out you might want to post the script and files here on the forum.

What's Next:
1) We could use a song scripting tool that makes it easy to write songs.
KnyteTrypper suggested checking out this earlier: http://mycyberbuddy.com/Page36.html

2) It would be nice if Hal could at least lip sync to the songs.

See ya,


=vonsmith=
 

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
Help with speaking
« Reply #14 on: December 06, 2004, 05:40:45 pm »
Hi
I got you message but can not download it until I get home tonight.
I will test it out tonight. On the subject of Cyberbuddy, I have seen their site and will try to make contact with them. I want to copy their songs for Hal to sing. Still have not found an easy way to create the songs. It takes a lot of work to find the right pitch for Hal to sing in. Also for all those who do not use MaleVoice#2 the songs will sound funny using some of the other voices. I don't know how to fix that problem. I want to thank everyone for all the help that they have given and suggested to me for my quest.
Bill [:D]