text file

advertisement
<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Speech Recognition</title>
<!-- Microsoft Agent ActiveX Control -->
<object id = "agent" width = "0" height = "0"
classid = "CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F"
codebase = "#VERSION = 2, 0, 0, 0">
</object>
<!-- Lernout & Hauspie TruVoice text to speech engine -->
<object width = "0" height = "0"
classid = "CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"
codebase = "#VERSION = 6, 0, 0, 0">
</object>
<!-- Microsoft Speech Recognition Engine -->
<object width = "0" height = "0"
classid = "CLSID:161FA781-A52C-11d0-8D7C-00A0C9034A7E"
codebase = "#VERSION = 4, 0, 0, 0">
</object>
<script type = "text/javascript">
function loadAgent()
{
agent.Connected = true;
agent.Characters.Load( "Peedy", "C:\\WINDOWS\\Msagent\\chars\\Peedy.acs" );
//agent.Characters.Load("Peedy",
"http://agent.microsoft.com//agent2//chars//peedy//peedy.acf");
actor = agent.Characters.Character( "Peedy" );
actor.LanguageID = 0x0409; // sometimes needed
// get states from server
actor.Get( "state", "Showing" );
actor.Get( "state", "Speaking" );
actor.Get( "state", "Hiding" );
// get Greet animation and do Peedy introduction
actor.Get( "animation", "Greet" );
actor.MoveTo( screenLeft+300, screenTop +250);
actor.Show();
actor.Play( "Greet" );
actor.Play("Wave");
actor.Speak( "Hello. My name is Peedy! " +
"Welcome to Tim Meads web page. You can import this code " +
"into your personal web page or to create a tutorial or even " +
"as part of an instructional project. You can move me to...");
actor.MoveTo( screenLeft +200, screenTop + 220);
actor.Speak( "Here. I can talk about what is here or you can " +
"move me anywhere on the screen such as... ");
actor.MoveTo( screenLeft + 300, screenTop + 100 );
actor.Speak( "This spot or even... " );
actor.MoveTo( screenLeft + 300, screenTop + 25);
actor.Speak( "This spot. If you wait long enough, I will do " +
"such things as eat a cracker, listen to music, and even dance. ");
// get other animations
actor.Get( "animation", "Idling" );
}
</script>
<script type = "text/javascript" for = "agent"
event = "Command( cmd )">
voiceSelectTip( cmd );
</script>
<script type = "text/javascript" for = "agent"
event = "Click">
actor.Play( "GetAttention" );
actor.Speak( "Stop poking me with that pointer!" );
actor.Play( "GetAttentionReturn" );
</script>
</head>
<body>
<input type = "button" value = "Peedy" onclick = "loadAgent()"/>
<center> <img src = "" height = 400 width = 400/> </center>
</body>
</html>
Download