PDA

Click to See Complete Forum and Search --> : microsoft agent in vb


pranavdesai
Mar 10th, 2001, 01:41 AM
does anyone know how to use the ms agent technology in vb?or can it be used in vb?if so what are the essential requirements for that.do we need to have the aagents with us?what are the methods?if u know about any sites giving info on it plz do give the names of the sites

SkeletoN
Mar 10th, 2001, 03:19 AM
Visit http://msdn.microsoft.com/workshop/imedia/agent/default.asp for information.

War_den
Mar 10th, 2001, 05:33 PM
adding agents to you app is easy but if you plain on publishing your application it requers that the end user download and install the MS agens 2.0 and if you have voice commands they need to install the Voce reconision engen, you can get both from microsoft or I can send you all you need,

you only need 4 lines of code to add an agent to you application and as far as animations and for them to talk well it is one line of code of each.. vary simple, here is a sample code for you to try affter you install agent 2.0 and ms voice..


befor you copt past this code you will need to place the following on your form

1) TextBox
2) Button
3) and the MS agent control


Dim Genie As IAgentCtlCharacterEx
Const DATAPATH = "genie.acs"


Private Sub Form_Load()
Agent1.Characters.Load "Genie", DATAPATH
Set Genie = Agent1.Characters("Genie")
Genie.LanguageID = &H409
TextBox.Text = "Hello World!"
End Sub

Private Sub Button_Click()
Genie.Show
Genie.Speak TextBox.Text
Genie.Hide
End Sub

PsychoMark
Mar 11th, 2001, 02:14 AM
Hi, just wanted to give you some tips:

First of all, in the code War_den gave you, LanguageID = &H409 means English, all values are listed on the Microsoft Agent site...

The character can also perform animations, some of them are general to all (currently four) characters, others are specific. At the download page for MS Agent there are some VB Samples for download, one 'Hello World' sample and an 'Character Animation' sample. The second can open a character and show all his animations, very handy when you're programming and need an animation fast.

Animations can be played using: Genie.Play "Wave" (just replace Wave with the animation name).

And last but not least, if you want to use Voice Recognition too (which is great in combination with the character), you can either use the MS Agent Control built in Command option or use the DirectSpeech Recognition control.

To explain the difference:

The MS Agent control can let your character listen for voice commands, which can be easily added trough the Commands property (not sure, doing this from the mind, but it should be something alike). When your character starts listening, a notice shows up on the screen, displaying things like "Listening...", "Recognized '*******'".

The DirectSpeech Recognition control works in a slightly different way (requiring a file or string for it's recognition, so it's harder to remove a command at runtime), but it runs independently of the Agent. This means nothing shows up on screen unless you want it to. Also, I've noticed (at least on my P133, but those people are still out there), the MS Agent built in commands are slower then when using the DirectSpeech Recognition control.


Ok, maybe I've taken this a little too far :D, but if you're stuck on something, you can always mail me: webmaster@psprogramming.virtualave.net...

Good luck!

War_den
Mar 11th, 2001, 01:42 PM
and to end it al you can get new agents by simply doing a search for ms agents in any search engen I bleleve there are more then 8 to download, I have 9..

PsychoMark
Mar 11th, 2001, 01:51 PM
wow, have to search for them some time...

But there not Microsoft's right? That reminds me, you can create your own too using a series of bitmaps. There's an Editor somewhere on the MS Agent site, but that's a lot of work :)

War_den
Mar 11th, 2001, 01:59 PM
they are agents by users, and they are vary good.

I am working on a few my self, found some niffty tools for making agents. and if you know any 3d prgramingand have a 3d graphics designer you can make an agent in no time flat.

Sugested tools, MS agent design and poser 4, or 3D max, or Lightwave6, or AutoCad 2000, and that should do for making some vary cool agents, I am working on one that is vary life like. and is going to have advansed actions,

example..

I have an agent show up when the application start, the hes gives a big intro, walks over to the form and drops a enter button, it looks realy cool, I am trying to make them more interavtive, as far as picking, moving, droping, and pushing things around on the form. is looking good so far.

PsychoMark
Mar 11th, 2001, 02:05 PM
Now that's kewl...

I got 3D Studio Max 3 myself (including Character Studio), so the tool isn't that much of a problem, but I'm not good at creating characters, so maybe I can create a ball jumping around with eyes ;)...


But I think we're getting a little off-topic here.... to get back: pranavdesai, any luck so far?

pranavdesai
Mar 15th, 2001, 10:13 AM
thank u both of u.actually i have been really busy with my engineering studies preparing for my exams so i was unable to be on the net.i will be unable to work on the code just as yet.however i do wanna ask a question is it necessary for the person using it to download the ms agent thing or can i provide it too.if so how big will the whole prog be?

PsychoMark
Mar 15th, 2001, 10:19 AM
I'm not sure if it's legal to distribute the MS Agent files along with your application. I think you'll either need MS approval (you could get that if I'm correct, check the MS Agent developer site, it's somewhere on the MS Agent page), or provide a download link.

The end user will at least need the MS Agent Core files, a Text-to-Speech engine and the character. If you're going to use voice recognition they'll need that too. The total download will be around 4 to 8 MB if I'm correct...

War_den
Mar 15th, 2001, 01:39 PM
you can download a copy of the MS licens, it is to go with your app, and only the core files have to be included, if you are including actrs, I sugest putting them in a resorce file, so they become a true part of the applications and now extra files..