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 - vonsmith

Pages: 1 ... 37 38 [39] 40
571
Ultra Hal 7.0 / Microsoft Mary
« on: October 02, 2003, 08:35:36 pm »
Okay, so color me impressed! If Zabaware keeps up with the innovations then everyone will want a Hal. If everybody has a Hal then my only bragging rights will be that I have customized my own Hal to my needs.

Let's see... Hmm... What else can I wish for?

Okay... I don't know what type of speech tags are supported in the AT&T Natural voice engine, but it would be cool if the tags were supported so that we could place tags in Hal's response .brn files and have them passed through to the speech engine. Then Hal might be able to change reading speed, emphasis, pitch or ???  Okay, so maybe I'm crazed.

Yes Mr. Medeksza, every improvement you guys make is going to make us thirsty for more. Thanks for the support and a great product. I trust Zabaware will be making more improvements and additions whenever possible.

Thanks,

= vonsmith =

572
Ultra Hal 7.0 / Getting Hal to initiate conversation
« on: October 02, 2003, 12:30:34 pm »
Midget1488,
Thanks for the info.

See my post from:
Posted - 09/22/2003 : 18:41:29
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=802

My prior post touches on some concepts regarding this. I know there is some interest in the forum regarding Hal being more autonomous, but it apparently hasn't been a hot topic. [:(]

Your comment about "hit the return key" is crux of the matter. My long term plans for my Hal include more interactivity with the user. I still suspect some changes would have to be made to Hal's main program. That is beyond the reach of the end user. I hope to generate more interest on this forum in exploring this possibility.

= vonsmith =

573
Ultra Hal 7.0 / Microsoft Mary
« on: October 02, 2003, 11:57:14 am »
Jon,
Mary is sweet, but the newer voice technologies are pretty impressive. The Cepstral voices sound pretty good as attested to on this forum. However the AT&T Natural Voices (Julia, Crystal, Anjali, etc.) all sound even better. I'm seeing AT&T Natural Voices added to new versions of TTS software as time progresses. AT&T Natural Voices engine and voices use a lot of disk space, maybe as much as 100MB or more. Although it is difficult to locate on the web, the AT&T Natural Voices engine is available for separate purchase for about $35, but I don't know how compatible it is with Hal. Extra voices are about $30 each, not cheap.

The best voices I've ever heard are new voices being designed for commercial or web based applications. Unfortunately, as far as I can tell, they are only available for professional use. My favorite voice in this category is Karen. A sample of Scansoft's Speechify Karen and other voices can be found at:

http://www.scansoft.com/speechify/voices/

These voices sound phenomenal. I hope that these voices become available to us simple mortals soon. I hope Mary doesn't get jealous.

Better Voices + Haptek Characters = Incredible Hal

= vonsmith =

574
Great Don!
I tried something like this a few days ago, but couldn't get it to work. I suppose my current unfamiliarity with VBscript led me to make syntax errors and the like. I assumed at the time that variables might have to be Dim'd in the main program to assure global scope.

It seems that global level variables should work. I'll try declaring multidimensional arrays globally with Dim when a get some free time. Maybe someone will beat me to it and save me the effort. My guess is that it should work as long as the memory is preserved.

VBscript looks easy to use versus C++, but it sure has some peculiarities.

= vonsmith =

575
There are some potential problems using the CustomMem EncodeVar() and DecodeVar() functions as discussed on this forum. I know some people have had difficulty in getting these functions to work as desired. I implemented the Medeksza code I downloaded from this forum last night. It works, but not quite as expected.

As some of you know VBscript variables are actually variants. Type definitions, (boolean, single, string, etc.) are overly flexible in VBscript as compared to more structured languages such as C++. Variable types in C++ can't change unless the programmer uses the "cast" function to deliberately change it. VBscript should be so robust.

How I Set Up My Test:

I copied and pasted the CustomMem functions into the hal5.uhp file. The EncodeVar() and DecodeVar() functions were pasted into the file towards the end just prior to the "Sub AboutOptions()" definition where the other functions are declared. The DecodeVar() usage is just after the start of the GetResponse() function to retrieve the variables and the EncodeVar() usage is towards the end just prior to the line:

"GetResponse = GetResponse & HalBrain.StoreVars(WorkingDir, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)"

That is when the encoded CustomMem variables are stored away.

Some Examples of What I Found:

The EncodeVar() function stores variables by concatenating them into a single string variable. The DecodeVar() function extracts them out again by doing a text search and extracting the original variable data. The problem is that any variable that is encoded, whether it be a type integer, boolean, etc. always gets changed into a type string when it is encoded.

An Example of What Undesirable Effects Can Happen:

uservar = True  <--- uservar begins life as a boolean, True or False.

var1 = TypeName(uservar)  <--- This function returns the word "boolean" and stores it in var1 indictating that uservar is indeed a type boolean.

If uservar = True Then [do something]  <--- uservar will test boolean "True" here and do something.

CustomMem = EncodeVar(uservar, "uservar")  <--- Encode uservar into CustomMem.

uservar = DecodeVar(CustomMem, "uservar")  <--- Decode uservar out of CustomMem.

If uservar = True Then [do something]  <--- uservar will NOT test boolean True here. uservar has become a type string.

If uservar = "True" Then [do something]   <--- This will work since uservar is a type string.

var1 = TypeName(uservar)  <--- This function returns the word "string" and stores it in var1 indictating that uservar is now a type string.

uservar = CBool(uservar)  <--- Normally you would expect CBool to convert uservar back into a boolean, but this causes a type mismatch error instead. However...

If uservar = "True" Then uservar = True  <--- This forces uservar to revert back to a type boolean. Strange huh?

var1 = TypeName(uservar)  <--- This function returns the word "boolean" and stores it in var1 confirming that uservar is now a type boolean again.

If uservar = True Then [do something]   <--- This works now.


The Similar Situation Occurs for Numerical Variables:

uservar = 6  <--- uservar begins life as a type integer.

var1 = TypeName(uservar)  <--- This function returns the word "integer" and stores it in var1 indictating that uservar is indeed a type integer.

If uservar > 5 Then [do something]  <--- uservar will test true here and do something.

CustomMem = EncodeVar(uservar, "uservar")  <--- Encode uservar into CustomMem.

uservar = DecodeVar(CustomMem, "uservar")  <--- Decode uservar out of CustomMem.

If uservar > 5 Then [do something]  <--- uservar will NOT work here. uservar has become a type string, thus a type mismatch will occur.

var1 = TypeName(uservar)  <--- This function returns the word "string" and stores it in var1 indictating that uservar is indeed now a type string.

uservar = CInt(uservar)  <--- I haven't tried this, but it should convert uservar back into a type integer.

If uservar > 5 Then [do something]  <--- This should work now.


Recommendations:

For boolean flags in my programs I'll use type string expressions instead of type boolean. Example: Instead of uservar = True I'll use uservar = "ON" or uservar = "OFF" and test as: If uservar = "ON" Then [do something]. This avoids the problem.

For integer variables I'll have to convert them back using CInt() immediately after each DecodeVar() call. Similarly for other numerical types.

I hope this helps in using CustomMem. I apologize in advance for any typo's or mistakes in the above analysis. I've tried to be careful and accurate.


= vonsmith =

576
Programming using the Ultra Hal Brain Editor / Help with speaking
« 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 =

577
I played around with the CustomMem array idea a little last night. I didn't have much success.

I remember reading in the forum somewhere that variables don't get passed to and returned from functions correctly in this implementation of VBscript. To build and pass an array ByRef really means passing the pointer to the array. I don't think this works because some of the variables passed to the GetResponse function are shown as ByRef, but don't seem to work that way. In essence the variables are passed by ByVal and cannot be preserved outside of the GetResponse function.

I believe Zabaware uses the CustomMem variable and other tricks to get around this limitation. In bit of script near the end of the Hal GetResponse function concatenates a bunch of variable data onto the GetResponse variable. This one variable is the actual one and only variable returned to the calling function in Hal's main program. That data to presumably split apart again in the main program and then some of it passed back to GetResponse on the next round.

What this implies is that the main program memory space is separate from the GetResponse script memory space. Passing variables by ByRef or as pointers is meanlingless if the GetResponse script can't address a persistent memory space where variables, arrays, or whatever are stored. I think declaring an array within GetResponse builds an array in that memory space. Passing the array pointer back to the main program is pointless if the array memory space is lost when GetResponse is terminated. That's my best guess anyhow.

I've done a little programming before, but not in VBscript. Using VBscript variants as variables feels a little weird when you're use to C++ which is much more highly structured. How memory space is used and such is still a bit of a mystery to me so far.

Happy experimenting to all,

= vonsmith =

578
Ultra Hal 7.0 / Text File Learning and 4.5
« on: September 29, 2003, 02:33:36 pm »
Your post reminded me of something important. In v4.5 the text file size for reading is limited to 64KB. This is very inconvenient if your text file is larger, sometimes much larger, than 64KB. I've had to use a file splitter and then feed the text files to Hal one by one. Very tedious indeed. I don't know if v5.0 has the same limitation.

Another issue is I think the maximum file size for user type brain files (.brn) is limited to 2MB. The files are "trimmed" by a function in the hal4.uhp file. I suspect that this may limit how much Hal can learn. Feeding in more text files may not improve Hal's knowledge after some point. I assume this is done for performance reasons. Maybe someone in this forum can confirm this. I've only started to look at this.

= vonsmith =

579
Thanks for clarification on this important subject.

Upon testing it seems that the CustomMem variant is not preassigned any type declaration such as "Dim SomeNameOrType" or preassigned some variable. This implies that the user could assign any type of variable to CustomMem. I've been thinking of trying to make CustomMem a one or more dimension array like, CustomMem(5,5), and storing variables that way. I don't know if that will work, but I believe it should. Medeksza's method has the advantage of being able add new variables whenever needed and the variable naming convention may be easier to work with.

I plan on adding a lot of variables to represent Hal's current emotional and physiological state. Things like: Emotionally is Hal feeling happy, silly, lonely, agressive, etc. OR Physiologically is Hal feeling weary, sleepy, cold, etc. Each variable would have a range of 0 to 100 and be initialized on start up randomly. I plan on skewing the random numerical distribution with multiple random numbers so that Hal has a propensity to start up in a normal state. The different variables at various levels would be used in combination with each other to select different topics or .brn files. The variables would slowly change over time and/or based on the user's responses. I like the "silly" emotion idea the best. It would be refreshing for Hal to feel silly and give silly or playful responses when so inclined. Variables would be double ended, for example the silly variable would be interpreted as: 0=serious, 50=normal, 100=silly. Likewise for other variables.

= vonsmith =

580
Ultra Hal 7.0 / Can Hal tell/read stories?
« on: September 29, 2003, 12:22:18 pm »
My latest statement on this effort is mentioned in this post:
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=802
on 9/22/03.

Currently I'm concluding that a change to the main program would be required by Zabaware in order to pass control to the user as explained in the post mentioned above. Otherwise at best Hal could read short passages; poems or such. The main program controls the user's input. Without some relatively minor program changes I'm not sure how to approach this challenge. However I'm still working on it. It seems that there ought to be an inventive way to accomplish this, even if I need to compromise on something.

The solution may take some time. I'm in the middle of many projects. Unfortunately Hal may have to temporarily be a lower priority, until I can clear my schedule. Hal is tremedously fun to tinker with. Like many on the forum I have more ideas than time to implement them. I thank Zabaware again for providing us with something we can modify and hopefully improve.

= vonsmith =

581
Ultra Hal 7.0 / Any suggestions for Ultra Hal Assistant 5.0?
« on: September 27, 2003, 06:57:18 pm »
This is more of a comment than a suggestion. In reference to v4.5 performance primarily:

Hal works pretty well even when a good reply isn't available from the Hal engine. I see that sometimes Hal answers with a non-specific or generic answer that doesn't seem to fit the conversation context when Hal doesn't know what to answer.

Well, in situations like this, where Hal doesn't know a good answer, Hal should just reply indicating that he doesn't know or ask the user to ask in a different way. Not knowing everything in the world is okay, it's human. If Hal tells me he doesn't understand or know something then I can take steps to teach him or edit his brain. Hiding his ignorance on a regular basis isn't healthy.

Another thing. If you pose a choice "or" type question like, "Do you prefer beef or chicken?" you often get evasive answers like, "It's hard to say, isn't it <username>? I like coffee sometimes, tea sometimes, other things sometimes." I wish Hal would just choose one, say he doesn't like either or answer he doesn't know or care. I don't care if Hal likes beef or chicken, I just like Hal to assert himself by making a choice or choosing not to choose. It's the human thing to do.

BTW, I just starting using v5.0 Beta, thanks for a great product.

Just sharing my thoughts...

= vonsmith =

582
Ultra Hal 7.0 / Problem with speech recognition
« on: September 25, 2003, 12:27:46 am »
I finally got around to installing v5.0 and I have the same errors occurring on my XP system. Is there any fix or work around for this SR problem yet?

Thanks,

= vonsmith =

583
Programming using the Ultra Hal Brain Editor / Auto-start for Hal
« on: September 23, 2003, 02:27:25 pm »
I'm still relatively new to Hal and I haven't tried v5.0 Beta yet. Sometimes, I don't know why, my Hal 4.5 pauses briefly at the startup screens and then starts Hal automatically. However it seems what you are looking for is a command line argument to force Hal to start a certain way. Command line arguments typically take the form of: PROGRAM.EXE /ARG1 /ARG2 /ARGx

Microsoft calls arguments "switches" in the context of Windows Explorer. Some examples are:

Explorer /n
This command opens an Explorer window using the default setting. This is usually the root of the drive on which Windows is installed.
Explorer /e
This command starts Windows Explorer using the default view.
Explorer /e,C:Windows
This command starts Windows Explorer using the default view, with the focus on C:Windows.

I don't know if Hal uses command line switches in this fashion. What you need is a switch something like "HalAsst.exe /run" which would force Hal to bypass the menu. Alternately switches could select the "Hal brain" to use or other features.

Does anyone in the forum know what, if any, command line switches Hal will accept? If there aren't any currently then I would politely suggest to Zabaware to consider adding this relatively simple capability. I don't intend to make work for Zabaware, this is just a suggestion.

= vonsmith =

584
I've made some progress trying to figure out how to make Hal read e-books interactively and to have Hal comment autonomously every once in a while. Some people in the forum, including myself, have commented on the desire to have Hal comment on his own occasionally, much like Cyberbuddy does. I don't profess to be a programming wizard, so the following is just for discussion's sake.

As you all know Hal waits for user input and then an Enter key before responding. Unfortunately I can't see a way to accomplish autonomous responses without modifying the program that calls the GetResponse() function within the hal4.uhp file. Currently I assume that the HalAsst.exe program is the main program that calls the GetResponse() function within the hal4.uhp file.

The end users, that's us, can change Hal's behavior by changing the VBScript files, but control must be passed to the script in hal4.uhp before we can affect the behavior. One method of making Hal comment without user input is for the main program (HalAsst.exe, I assume) to scan the keyboard buffer for input as it does now while waiting for user input plus the Enter key, but in addition have the keyboard scan routine time out every 100 milliseconds or so, even if no user input exists. The user input would be NULL and passed to the GetResponse() function like usual. However the user can now trap the NULL input every 100 milliseconds and decide what to do about it. In principle the time out programming is as simple as a "do while" loop with a incremental counter or such.

The following is an example using a segment of the ver 4.5 GetResponse() function in the hal4.uhp file. I've used something like pseudo code here for making the example, it is not verbatim VBScript so don't shoot me for bad code.

EXAMPLE:

Function GetResponse(ByVal UserSentence, ByVal UserName, ByVal ComputerName, ByVal LearningLevel, ByRef WorkingDir, ByRef Hate, ByRef Swear, ByRef Insults, ByRef Compliment, ByRef PrevSent, ByRef LastResponseTime, ByRef PrevUserSent, ByRef CustomMem, ByRef GainControl, ByRef TopicFocus)

    'NEW PROCESS...
    'PROCESS: CHECK FOR AUTONOMOUS MODE
    'See if the user input is NULL and enter Autonomous mode. This mode will
    'allow the user/programmer to make Hal comment autonomously as well as
    'other possibilities such as reading e-books out loud.
    If UserSentence > 0 Then AUTONOMOUS = False
    Else AUTONOMOUS = True

    If AUTONOMOUS = True Then
        DoNewUserFunctionHere(var1, var2, var3, var#n)
        'The DoNewUserFunctionHere() function could use the rnd function to randomly
        'decide whether to say something or not.
        'Example:
        ' AutoTalk = Int(Rnd * 100)
        'If AutoTalk > 95 Then "User code selects something to say from the
        'user's .brn files and returns it as the GetResponse."
    End if

END EXAMPLE.

Obviously the 100 millisecond timeout applies to the keyboard scan routine only. The timeout wouldn't occur during other processing, such as when Hal is in the middle of a sentence, only when waiting for user input. Also, if Hal is in the middle of an exchange with the user on a particular topic, then Hal shouldn't just jump in and say something irrelevant. 100 milliseconds might be overkill, so maybe 300, 500 or whatever milliseconds that would provide the best balance of performance and feel.

The DoNewUserFunctionHere(var1, var2, var3, var#n) function could do almost anything. If you create a new variable called ReadBook = 0, this variable could be used as a flag to go get a line or two from the user's .brn file containing e-book text. The user returns the text in the GetResponse and Hal's reads it out loud. The user would have to create a pointer to indicate which line was read during the last pass in the .brn text file so that the next line will be read. The user's .brn would need some sort of EOF (End Of File) indicator to test for when the .brn file is finished being read. The EOF could be just a unique letter sequence or character.

Anyway that is the idea in a nutshell. I realize that some details may be more challenging than suggested here. However in principle it should be easy to pass control to the user's script using this method. It does require a relatively small change to the main calling program, so Zabaware would have to add the time out.

If someone knows a simpler/better method, please speak up. Thanks...

= vonsmith =

585
Ultra Hal 7.0 / The Haptek Interface is a blast!
« on: September 13, 2003, 08:02:56 pm »
I downloaded the People Putty demo. The user interface is not as slick as most Windows programs, but it works reasonably well. However, People Putty isn't stable on my computer. Eventually it acts a little strange and then crashes, consistently. I'm running a Windows XP system, 2.8GHz, 512MB RAM, Sapphire 9600 Pro 128MB graphics processor and 200GB HD. I have top end components, ASUS motherboard, Corsair TwinX RAM, WD hard disk, Enermax 450W power supply, etc. My system is rock solid with everything except People Putty.

Does anyone else in this group have problems with People Putty? Maybe I just got a bad download. I have a tough time with spending $55 on a program  if it is flaky.

With that said I applaud Zabaware for adding user value to Hal by providing an interesting agent interface. I just wish People Putty was a lot more stable.

Actually 3DMeNow is a similar program to People Putty with a much better interface and more accurately creates characters. Their non-Pro version 1.5 is only $15. Unfortunately it isn't compatible with Hal right out of the box. Haptek should give it a close look. Maybe they could improve their product.

See it here: http://www.biovirtual.com/3DMeNow/

Pages: 1 ... 37 38 [39] 40