While writing a letter in MS Word, I accidentally clicked on the help button and this animated little thing on a a bike jumped up and presented me with an input box. I’ve seen it a few times before, but this time I wondered if I could write a program that could animate characters in Delphi.
A downloadable file for this program is available here.
I got on the Internet and started searching for help on how it can be done, after getting no help from my colleagues, who also program in Delphi. I eventually visited the Microsoft website, where I found everything that I needed. Microsoft has a Development Kit called Agent SDK that enables you to create interactive agents.
Getting Started
The first thing we need to do is download the Microsoft core components and character files. We also need to download a text-to-speech engine and a speech recognition engine. You can also download the speech control panel and Microsoft's' Linguistic Information Sound Information Tool (LISET), which allows you to modify the settings of your speech engines. All of this can be downloaded from http://www.microsoft.com/msagent/downloads/developer.asp.
Microsoft offers four agents: Peedy, Merlin, Robby and Genie. If you plan at any stage to distribute these agents with your application you must avail yourself of the Microsoft Agent Licensing and Distribution agreement. So the components that you'll need to write your own application with MS Agents are:
Agent Core Components
Speech Recognition Engine
Characters
L&H TruVoice TTS Engine
Microsoft Character Editor
LISET
Please note that once you've installed these components, Windows will regard them as system components, so you can only uninstall them when re-installing your Windows operating system. All of your characters should or will be located in your root directory, c:windowsmsagentchars or c:winntmsagentchars.
Also when planning to distribute the application, as a minimum requirement, make sure that the target system has Internet Explorer installed, as that will mean that all the components that are needed will be installed and the user can use the agents without any problems.
The next thing we need to do is import the Microsoft Agent Active X Control. This control will be registered the moment you finish installing the core components. In Delphi, go to the Components menu and select "Import ActiveX Control:"
Scroll down to Microsoft Agent Control and click the install button. The new component will be installed in the ActiveX page of the Component palette. That's it! We now have the agent installed.