Saw this code snippet in the program e & Haptek example.
<script language="javascript">
var elizaresponse= "<template context="tts"><response index="1"/></template>";
var hapA= "\\q2[s0=[";
var hapB= "]]";
function nadiaTalk(){
parent.SendText(hapA+elizaresponse+hapB);
}
nadiaTalk();
</script>
I believe this is the part which gets Haptek to speak out ALICE response so can anyone please guide me through this from how ALICE reply is retrieved to the part where it is sent to Haptek to be speaked out, thanks.
can you explain about this line of code
var elizaresponse= "<template context="tts"><response index="1"/></template>";
What doe the "template context" refer to in this case? Is it a default definition or used-defined tag?
For the last line of code
parent.Sendtext = parent.Sendtext(\\q2[s0=[Yes it is a nice day.]])
"parent.Sendtext" is used to send text back to the Haptek player? So in this case we are sending reply back to the parent page for it to be speaked out. What about the case we are trying to send from parent to child page?
GT40, I have tested your Meghan with the input 'site' and that the avatar just speak the text link without the code, do you how to implement this on program d?
In program d, the way I insert a html link to work is as follows:
<html:a href="http://www.google.com" target="_blank">google</html:a>
I have to put the html tag or else it won't work. As a result, it will speak out some codes and the whole link address. Ideally I just want the html link to execute without any text showing up or avatar speaking anything.
Infortunately, cybertution, as you can see, I don't know Program D. With Pandorabots, your code for the template line becomes ("normal" HTML):
<a href="http://www.google.com" target="_blank">Google</a>
If you ask "google" to Meghan:
- She says "Google" (and never shuts up, lol)
- She writes "Google"
- The link is valid but must be clicked
Of course, all this is not what you wish to get. Maybe on AI Nexus?
And oops, thank you for indirectly teaching me how to insert codes in AI Dreams posts. Never tried this before. Senior member but total newbie. :)