Search code examples
powershelldemomicrosoft-agent

Crazy Demo: Multiple Microsoft Agents


I am creating an extreme and kinda silly demo for a presentation I am giving. I was hoping to use some type of API to display multiple actors and was planning on using Microsoft Agent. Is it possible with Microsoft agent to display 2 or more agents at the same time? Using multiple threads or processes is not a problem and it by no means has to be pretty.

To make working with COM easy I am using PowerShell V2 and my current code looks something like this:

$agent = new-object -com agent.control.2
$agent2 = new-object -com agent.control.2

$agent.connected = 1
$agent2.connected = 1
[void] $agent.characters.load("Merlin")
[void] $agent2.characters.load("Robby")
$merlin = $agent.characters.character("Merlin")
$robby = $agent2.characters.character("Robby")

# Insert silly demo with our actors Merlin and Robby here!

EDIT: I am by no means sold on Microsoft Agent. If you have a better way of doing the same or similar thing I would love to hear about it.


Solution

  • In the end I used a single agent for my demo and it still got the point across. The final demo was a microsoft agent and the .NET speech api reciting a portion of Romeo and Juliet. I believe that it is possible to get more than one if you use process isolation but then you would need to perform process synchronization.