Advertisment

A personal touch to your Web Applications

author-image
PCQ Bureau
New Update

Coding an application with user assistants and character help

systems that can take voice inputs and speak as well, may seem a nightmarish job

for an independent programmer. But now, there's an easier answer to it.

Microsoft Agent, which Microsoft defines as "ActiveX technology for

interactive software agents" allows you to program interactive animated

characters. Microsoft Agent runs as a COM server that can be programmed in

COM-enabled languages such as Visual J++ and Visual C++, and also as an ActiveX

control in languages such as Visual Basic, VBScript, JavaScript, etc, to make

use of special interactive characters. These characters can take speech input

using Microsoft Speech Input Engine, and give text-to-speech output using

Lernout and Hauspie text-to-speech engine.

Advertisment

You can create these characters using Microsoft's Character

Editor and Microsoft Linguistic Information Editor, which allow programming

lip-synching with voice output, various gestures, and special sounds. Default

characters can also be used, including Peedy the Parrot, Merlin the Wizard,

Genie, and Robby the Robot.

The characters are comparable to Microsoft Office Assistant

characters, but they aren't the same. Microsoft Agent characters are not

limited to a specific type of application, and have voice input/output

capability. They can also move on the screen, make gestures and actions on

screen with sounds of their own, and use pre-recorded WAV files for speech.

Microsoft Agent can be used for many applications such as interactive user

interfaces to Web pages (due to scripting support) and GUI-based applications,

story tellers, Web page reader applications, application interfaces for the

disabled, e-mail notifiers and readers, help systems, chat avatars, and computer

buddies.

The speech engines are adaptive, and as new voice recognition

and speech input technologies come up, the same Agent application can easily be

ported to a new speech platform, provided the latter is compatible with

industry-standard speech API.

Advertisment

The characters are stored in separate ACF files. Microsoft Agent is a sort of

patch to Windows, and Windows 2000 even ships Microsoft Agent by default. With a

typical executable application using Microsoft Agent, Microsoft Agent setup and

Lernout and Hauspie TTS engine setup are run separately as per licensing rules.

The characters are a complement to the GUI interface and do not substitute it.

Microsoft Speech Recognition is the only choice for voice input, while for

text-to-speech output the choice could be between Microsoft and Lenout and

Hauspie TTS engines.

Let's take a look at how you can program Agent in JScript

or JavaScript.

Let's assume that you've downloaded and installed

Microsoft Agent, and the Robby Character-whom this script calls Robby, and he

says "Mera Bharat Mahan!". Comments in the source describe the code

(see box).

Advertisment

More information, documentation, characters, Microsoft Agent

API, and tools, are available at www.microsoft. com/agent.

There are very few implementations of Microsoft Agent in the

market today. One good and popular implementation is BonziBuddy-a computer companion using the Peedy character-at www.bonzi.com

<br></br> <html i-amphtml-layout i-amphtml-no-boilerplate transformed="self;v=1"><head><style amp-runtime i-amphtml-version="012403142137000">html{overflow-x:hidden!important}html.i-amphtml-fie{height:100%!important;width:100%!important}html:not([amp4ads]),html:not([amp4ads]) body{height:auto!important}html:not([amp4ads]) body{margin:0!important}body{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}html.i-amphtml-singledoc.i-amphtml-embedded{-ms-touch-action:pan-y pinch-zoom;touch-action:pan-y pinch-zoom}html.i-amphtml-fie>body,html.i-amphtml-singledoc>body{overflow:visible!important}html.i-amphtml-fie:not(.i-amphtml-inabox)>body,html.i-amphtml-singledoc:not(.i-amphtml-inabox)>body{position:relative!important}html.i-amphtml-ios-embed-legacy>body{overflow-x:hidden!important;overflow-y:auto!important;position:absolute!important}html.i-amphtml-ios-embed{overflow-y:auto!important;position:static}#i-amphtml-wrapper{overflow-x:hidden!important;overflow-y:auto!important;position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:0!important;margin:0!important;display:block!important}html.i-amphtml-ios-embed.i-amphtml-ios-overscroll,html.i-amphtml-ios-embed.i-amphtml-ios-overscroll>#i-amphtml-wrapper{-webkit-overflow-scrolling:touch!important}#i-amphtml-wrapper>body{position:relative!important;border-top:1px solid transparent!important}#i-amphtml-wrapper+body{visibility:visible}#i-amphtml-wrapper+body .i-amphtml-lightbox-element,#i-amphtml-wrapper+body[i-amphtml-lightbox]{visibility:hidden}#i-amphtml-wrapper+body[i-amphtml-lightbox] .i-amphtml-lightbox-element{visibility:visible}#i-amphtml-wrapper.i-amphtml-scroll-disabled,.i-amphtml-scroll-disabled{overflow-x:hidden!important;overflow-y:hidden!important}amp-instagram{padding:54px 0px 0px!important;background-color:#fff}amp-iframe iframe{box-sizing:border-box!important}[amp-access][amp-access-hide]{display:none}[subscriptions-dialog],body:not(.i-amphtml-subs-ready) [subscriptions-action],body:not(.i-amphtml-subs-ready) [subscriptions-section]{display:none!important}amp-experiment,amp-live-list>[update]{display:none}amp-list[resizable-children]>.i-amphtml-loading-container.amp-hidden{display:none!important}amp-list [fetch-error],amp-list[load-more] [load-more-button],amp-list[load-more] [load-more-end],amp-list[load-more] [load-more-failed],amp-list[load-more] [load-more-loading]{display:none}amp-list[diffable] div[role=list]{display:block}amp-story-page,amp-story[standalone]{min-height:1px!important;display:block!important;height:100%!important;margin:0!important;padding:0!important;overflow:hidden!important;width:100%!important}amp-story[standalone]{background-color:#000!important;position:relative!important}amp-story-page{background-color:#757575}amp-story .amp-active>div,amp-story .i-amphtml-loader-background{display:none!important}amp-story-page:not(:first-of-type):not([distance]):not([active]){transform:translateY(1000vh)!important}amp-autocomplete{position:relative!important;display:inline-block!important}amp-autocomplete>input,amp-autocomplete>textarea{padding:0.5rem;border:1px solid rgba(0,0,0,.33)}.i-amphtml-autocomplete-results,amp-autocomplete>input,amp-autocomplete>textarea{font-size:1rem;line-height:1.5rem}[amp-fx^=fly-in]{visibility:hidden}amp-script[nodom],amp-script[sandboxed]{position:fixed!important;top:0!important;width:1px!important;height:1px!important;overflow:hidden!important;visibility:hidden} /*# sourceURL=/css/ampdoc.css*/[hidden]{display:none!important}.i-amphtml-element{display:inline-block}.i-amphtml-blurry-placeholder{transition:opacity 0.3s cubic-bezier(0.0,0.0,0.2,1)!important;pointer-events:none}[layout=nodisplay]:not(.i-amphtml-element){display:none!important}.i-amphtml-layout-fixed,[layout=fixed][width][height]:not(.i-amphtml-layout-fixed){display:inline-block;position:relative}.i-amphtml-layout-responsive,[layout=responsive][width][height]:not(.i-amphtml-layout-responsive),[width][height][heights]:not([layout]):not(.i-amphtml-layout-responsive),[width][height][sizes]:not(img):not([layout]):not(.i-amphtml-layout-responsive){display:block;position:relative}.i-amphtml-layout-intrinsic,[layout=intrinsic][width][height]:not(.i-amphtml-layout-intrinsic){display:inline-block;position:relative;max-width:100%}.i-amphtml-layout-intrinsic .i-amphtml-sizer{max-width:100%}.i-amphtml-intrinsic-sizer{max-width:100%;display:block!important}.i-amphtml-layout-container,.i-amphtml-layout-fixed-height,[layout=container],[layout=fixed-height][height]:not(.i-amphtml-layout-fixed-height){display:block;position:relative}.i-amphtml-layout-fill,.i-amphtml-layout-fill.i-amphtml-notbuilt,[layout=fill]:not(.i-amphtml-layout-fill),body noscript>*{display:block;overflow:hidden!important;position:absolute;top:0;left:0;bottom:0;right:0}body noscript>*{position:absolute!important;width:100%;height:100%;z-index:2}body noscript{display:inline!important}.i-amphtml-layout-flex-item,[layout=flex-item]:not(.i-amphtml-layout-flex-item){display:block;position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.i-amphtml-layout-fluid{position:relative}.i-amphtml-layout-size-defined{overflow:hidden!important}.i-amphtml-layout-awaiting-size{position:absolute!important;top:auto!important;bottom:auto!important}i-amphtml-sizer{display:block!important}@supports (aspect-ratio:1/1){i-amphtml-sizer.i-amphtml-disable-ar{display:none!important}}.i-amphtml-blurry-placeholder,.i-amphtml-fill-content{display:block;height:0;max-height:100%;max-width:100%;min-height:100%;min-width:100%;width:0;margin:auto}.i-amphtml-layout-size-defined .i-amphtml-fill-content{position:absolute;top:0;left:0;bottom:0;right:0}.i-amphtml-replaced-content,.i-amphtml-screen-reader{padding:0!important;border:none!important}.i-amphtml-screen-reader{position:fixed!important;top:0px!important;left:0px!important;width:4px!important;height:4px!important;opacity:0!important;overflow:hidden!important;margin:0!important;display:block!important;visibility:visible!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:8px!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:12px!important}.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader~.i-amphtml-screen-reader{left:16px!important}.i-amphtml-unresolved{position:relative;overflow:hidden!important}.i-amphtml-select-disabled{-webkit-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.i-amphtml-notbuilt,[layout]:not(.i-amphtml-element),[width][height][heights]:not([layout]):not(.i-amphtml-element),[width][height][sizes]:not(img):not([layout]):not(.i-amphtml-element){position:relative;overflow:hidden!important;color:transparent!important}.i-amphtml-notbuilt:not(.i-amphtml-layout-container)>*,[layout]:not([layout=container]):not(.i-amphtml-element)>*,[width][height][heights]:not([layout]):not(.i-amphtml-element)>*,[width][height][sizes]:not([layout]):not(.i-amphtml-element)>*{display:none}amp-img:not(.i-amphtml-element)[i-amphtml-ssr]>img.i-amphtml-fill-content{display:block}.i-amphtml-notbuilt:not(.i-amphtml-layout-container),[layout]:not([layout=container]):not(.i-amphtml-element),[width][height][heights]:not([layout]):not(.i-amphtml-element),[width][height][sizes]:not(img):not([layout]):not(.i-amphtml-element){color:transparent!important;line-height:0!important}.i-amphtml-ghost{visibility:hidden!important}.i-amphtml-element>[placeholder],[layout]:not(.i-amphtml-element)>[placeholder],[width][height][heights]:not([layout]):not(.i-amphtml-element)>[placeholder],[width][height][sizes]:not([layout]):not(.i-amphtml-element)>[placeholder]{display:block;line-height:normal}.i-amphtml-element>[placeholder].amp-hidden,.i-amphtml-element>[placeholder].hidden{visibility:hidden}.i-amphtml-element:not(.amp-notsupported)>[fallback],.i-amphtml-layout-container>[placeholder].amp-hidden,.i-amphtml-layout-container>[placeholder].hidden{display:none}.i-amphtml-layout-size-defined>[fallback],.i-amphtml-layout-size-defined>[placeholder]{position:absolute!important;top:0!important;left:0!important;right:0!important;bottom:0!important;z-index:1}amp-img[i-amphtml-ssr]:not(.i-amphtml-element)>[placeholder]{z-index:auto}.i-amphtml-notbuilt>[placeholder]{display:block!important}.i-amphtml-hidden-by-media-query{display:none!important}.i-amphtml-element-error{background:red!important;color:#fff!important;position:relative!important}.i-amphtml-element-error:before{content:attr(error-message)}i-amp-scroll-container,i-amphtml-scroll-container{position:absolute;top:0;left:0;right:0;bottom:0;display:block}i-amp-scroll-container.amp-active,i-amphtml-scroll-container.amp-active{overflow:auto;-webkit-overflow-scrolling:touch}.i-amphtml-loading-container{display:block!important;pointer-events:none;z-index:1}.i-amphtml-notbuilt>.i-amphtml-loading-container{display:block!important}.i-amphtml-loading-container.amp-hidden{visibility:hidden}.i-amphtml-element>[overflow]{cursor:pointer;position:relative;z-index:2;visibility:hidden;display:initial;line-height:normal}.i-amphtml-layout-size-defined>[overflow]{position:absolute}.i-amphtml-element>[overflow].amp-visible{visibility:visible}template{display:none!important}.amp-border-box,.amp-border-box *,.amp-border-box :after,.amp-border-box :before{box-sizing:border-box}amp-pixel{display:none!important}amp-analytics,amp-auto-ads,amp-story-auto-ads{position:fixed!important;top:0!important;width:1px!important;height:1px!important;overflow:hidden!important;visibility:hidden}amp-story{visibility:hidden!important}html.i-amphtml-fie>amp-analytics{position:initial!important}[visible-when-invalid]:not(.visible),form [submit-error],form [submit-success],form [submitting]{display:none}amp-accordion{display:block!important}@media (min-width:1px){:where(amp-accordion>section)>:first-child{margin:0;background-color:#efefef;padding-right:20px;border:1px solid #dfdfdf}:where(amp-accordion>section)>:last-child{margin:0}}amp-accordion>section{float:none!important}amp-accordion>section>*{float:none!important;display:block!important;overflow:hidden!important;position:relative!important}amp-accordion,amp-accordion>section{margin:0}amp-accordion:not(.i-amphtml-built)>section>:last-child{display:none!important}amp-accordion:not(.i-amphtml-built)>section[expanded]>:last-child{display:block!important} /*# sourceURL=/css/ampshared.css*/</style><title>JScript/Javascript Sample</title></head><br></br> <body language="Javascript" onload="OnLoad()"><br></br> <h1>Microsoft Agent Sample-JScript</h1><br></br> <br></br> The OBJECT tag defines Agent ActiveX control to the browser (and even automatically downloads Agent if not found), from your Website.<br></br> -&gt;<br></br> <object height="0<br" id="”AgentControl”" width="0"></object> CLASSID=”CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F”<br></br> CODEBASE = “http:/your server/msagent.exe#VERSION=2,0,0,0”&gt;<br></br> <br></br> This tag initializes Lernout and Hauspie TruVoice TTS engine for voice output<br></br> -&gt;<br></br> <object height="0<br" id="”TruVoice”" width="0"></object> CLASSID=”CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"<br></br> CODEBASE=”#VERSION=6,0,0,0"&gt;<br></br> <br></br> <script language="JavaScript"><br /> var Robby; // a global variable to hold the character object<br /> function onLoad() {<br /> AgentControl.Connected = true;<br /> AgentControl.Characters.Load(“Robby”, “C:\\WINDOWS\\MSAGENT\\CHARS\\Robby.acs”);<br /> Robby = AgentControl.Characters.Character(“Robby”);<br /> Robby.LanguageID = 0x0409;<br /> // Loading Character, Putting reference to it in the variable, and initializing the<br /> // language as English<br /> Robby.Get(“state”, “Speaking, Reading”);<br /> Robby.Get(“animation”, “Greet, GreetReturn”);<br /> //Use the Get Method to preload all Actions and States to avoid delays in on-the-spot loading.<br /> Robby.Show(); //Show Character<br /> Robby.Get(“state”, “Hiding”);<br /> //Use the Speak Method to make the character Speak.<br /> Robby.Speak(“May raa Bhaa rut Muh haan!”);<br /> //Use the Play Method to make the character Perform animated actions, as defined in the character file.<br /> Robby.Play(“Decline”);<br /> Robby.Speak(“Hello there! I am Robby. I am very capable!”);<br /> Robby.Play(“Search”);<br /> Robby.Speak(“I can search in boxes”);<br /> Robby.Speak(“And I can Even do Magic!”);<br /> Robby.Play(“DoMagic2”);<br /> Robby.Speak(“And I can even Work out your Computer!”);<br /> Robby.Play(“Process”);<br /> Robby.Hide();//Hide Character<br /> }<br /> </script><br></br> </body></html><br></br>

 Akshat Singhal

Advertisment