Add a reference to Microsoft Agent server using tools - references - Microsoft Agent server 2.0
Here is the code
IAgentCtlCharacterEx Genie;
Keep a textbox on form and a button in the button click keep the following code
IAgentCtlCharacterEx Genie;
if(textBox1.Text!="")
{
Agent1=new AgentClass();
try
{
Agent1.Connected = true;
string strPath=ConfigurationSettings.AppSettings.Get("path").ToString();
//strPath is
Agent1.Characters.Load("Merlin",strPath);
Genie=Agent1.Characters.Character("Merlin");
Genie.Show(true);
Genie.Speak(textBox1.Text,"");
}
catch(Exception ex)
{
throw ex;
}
This is just an idea to share
No comments:
Post a Comment