Sei sulla pagina 1di 22

Presentation Narrator for Microsoft Agent version 1.

0
An application to narrate Microsoft PowerPoint presentations using Microsoft Agent Microsoft Corporation October 1999 Note: This document is provided for informational purposes only and Microsoft makes no warranties, either expressed or implied, in this document. The entire risk of the use or the results of this document remains with the user. Information in this document is subject to change without notice. Companies, names, and data used in examples herein are fictitious unless otherwise noted. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents or pending patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. The furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property rights. Microsoft, MS, MS-DOS, Windows, Windows NT, and the Windows logo are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners.

Contents
Introduction Preparing to Use the Presentation Narrator Starting the Presentation Narration Using the Presentation Narrator Scripting the Narration Scripting Syntax Scripting Examples Scripting Cautions Scripting Tricks Using Multiple Characters Simultaneously Adding Presentation Narrator to an Existing Presentation Developing for Microsoft Agent Support Credits

Introduction
The Presentation Narrator for Microsoft Agent is an application that can enhance a Microsoft PowerPoint presentation with animated characters that can audibly narrate and automatically advance through each slide. It utilizes the innovative software services of Microsoft Agent to display the animated character and output the narration during the presentation. With this application, presentations can be effectively delivered without the need for a knowledgeable and experienced presenter to deliver it. The author of the presentation can very simply script the actions and narration of the animated character by typing these into the Notes Pages of the presentation document.

Besides serving a useful and practical purpose of automatically narrating a presentation, this application is also intended to provide developers with sample code that illustrates how to integrate Microsoft Agent with Microsoft PowerPoint and other points about developing with Microsoft Agent.

Preparing to Use the Presentation Narrator


The setup procedure for the Presentation Narrator application basically consists of installing the Microsoft Agent core components (msagent.exe), a compatible Text-to-Speech engine (e.g. the U.S. English language engine, tv_enua.exe), and the appropriate Microsoft Agent character file (e.g. merlin.exe) for the narrator onto the local computer. If you have not installed these previously, the files are also available for download (along with all Microsoft Agent software and documentation) from the Microsoft Agent Web site at http://www.microsoft.com/msagent. If you are using Microsoft Windows 2000 or one of its pre-releases, you already have the equivalent of all three of these installed on your computer already. It is still recommended, though not required, that you also install the Text-to-Speech engine mentioned above (tv_enua.exe). The Presentation Narrator for Microsoft Agent was written exclusively for use with Microsoft PowerPoint 2000. Microsoft PowerPoint 2000 is required to run presentations with the Presentation Narrator. The Microsoft PowerPoint Viewer is not sufficient to run presentations with the Presentation Narrator. There is a special version of the Presentation Narrator for Microsoft PowerPoint 97. This is necessary because one minor feature of the Presentation Narrator requires the new event support within the Microsoft PowerPoint 2000 object model. That single feature is implemented differently in the special Microsoft PowerPoint 97 compatible version. All other functionality and all scripting syntax are unchanged between the two versions of the Presentation Narrator. If you are using Microsoft PowerPoint 97 and the Presentation Narrator doesnt seem to be starting, try using PresentationNarrator97.ppt, available with the Microsoft PowerPoint 97 version of the Presentation Narrator from the Microsoft Agent Web site at http://www.microsoft.com/msagent.

Starting the Presentation Narration


To begin using the Presentation Narrator for Microsoft Agent, open the appropriate Microsoft PowerPoint presentation file corresponding to either Microsoft PowerPoint 97 or Microsoft PowerPoint 2000. If a dialog box appears to alert the user that the presentation contains macros, select the Enable Macros button. The Presentation Narrator for Microsoft Agent application as supplied by Microsoft Corp. does not contain any viruses within its macros. Once the document is opened, advance the presentation to the first slide and switch to the Slide Show view. There is a large invisible rectangle shape on this slide that occupies the majority of its area. Wiggle the mouse around on the screen. This action will trigger the Mouse Over event of the Action Settings for the large invisible rectangle shape on the slide which will begin executing the Microsoft Visual Basic for Applications (VBA) code of the Presentation Narrator. A Microsoft Agent animated character will now appear onscreen and begin narrating the current presentation slide. It will continue advancing through to subsequent slides, playing animations and narrating text automatically without further user intervention.

Using the Presentation Narrator


During the scripted narration of the presentation, you can cease its playback by right-clicking on the character and then selecting Suspend in the displayed shortcut menu. This feature may be useful if the presentation is interrupted with a question from the audience. The character will remain visible while paused and may play idle animations.

Playback can be resumed again simply by right-clicking on the character and then selecting Resume in the displayed menu. The character will then resume from where it had left off. While suspended, you can also manually advance the presentation to another scripted slide, either subsequent or previous, to resume narration there. If the script for the current slide had executed entirely when suspended, the character will notify you accordingly when you choose to resume and suggest that you manually advance to another slide. If you choose not to and select resume again, the Presentation Narrator will begin execution of the current slides script again from the beginning. If you select Hide from the (right-click) shortcut menu of the character, this will cause the narrator to hide and stops the narration entirely. If you only wish to temporarily (or indefinitely) interrupt the narration, you should use Suspend from the menu rather than Hide.

Scripting the Narration


The actions of the animated character and the narration that is spoken is all derived from the script that is written by the presentation author within the Notes Pages of the document. The Notes Pages can still be used for their intended purpose as speaker notes. The demarcation point between speaker notes and the script for the narrator consists of a specially formatted line of punctuation - ^*#{}#*^. The VBA code of the Presentation Narrator ignores everything prior to this special marker and begins parsing commands to drive the narration following it. The type size of the text used on the Notes Page has no bearing upon the presentation narration but obviously, may affect legibility while you are writing the script. The text of the script can extend beyond the physical dimensions of the Notes Page but be careful of making your scripted narration longer than your audiences attention span. The narrator can be used to speak to the points on a slide and also, automatically advance to another slide with the SLIDE command. With this capability, the Presentation Narrator can be used to deliver the entire presentation.

Scripting Syntax
The Presentation Narrator supports the following commands and scripting syntax: AUDIO command AUDIONOCAP command Comment line END command HIDE command LOOP command MOVE command NEXT command PLAY command RUN command SAY command SAYNOCAP command SHOW command SLIDE command SOUNDFXOFF command SOUNDFXON command SUSPEND command THINK command Please note that the command names and speech output tags must be written in UPPER CASE. Doing so will also maintain a semblance of format and order to your narration script. --------------------------------------------------------

AUDIO command Description Plays the specified audio file and displays the text within the word balloon of the Microsoft Agent character being used as the Presentation Narrator. Syntax AUDIO <filespec> text

Part Filespec Text

Description Required. A string expression that specifies the audio file to play. The specification can be a file specification (with path) or URL. Required. The words to be displayed within the word balloon by the Microsoft Agent character being used as the Presentation Narrator.

Example AUDIO <c:\My Documents\Audio\greeting.wav> Hello, I am pleased to meet you. Remarks The supported audio file formats are Windows sound files (.wav) or Microsoft Agents linguistically enhanced sound file (.lwv). The latter are created with the Microsoft Linguistic Information Sound Editing Tool and documented in the Microsoft Agent SDK (both available for download from the Microsoft Agent Web site, http://www.microsoft.com/msagent). Use the AUDIONOCAP command instead when you want the Presentation Narrator to output an audio file using the text from a linguistically enhanced .lwv file or without displaying a text word balloon at all. See Also AUDIONOCAP, SAY, SAYNOCAP and THINK commands. -------------------------------------------------------AUDIONOCAP command Description This command is similar to the previous AUDIO command except that no text needs to be provided with the command line. If the audio file (.lwv) is linguistically enhanced with text, this will be displayed as captioning. Otherwise, no word balloon is displayed at all. Syntax AUDIONOCAP text

Part Filespec

Description Required. A string expression that specifies the audio file to play. The specification can be a file specification (with path) or URL.

Example AUDIONOCAP <c:\My Documents\Audio\greeting.wav>

Remarks Your script can freely alternate between AUDIO and AUDIONOCAP commands. Each command line is handled independently. See Also AUDIO, SAY, SAYNOCAP and THINK commands. -------------------------------------------------------Comment line Description Comment lines arent really commands although they are part of the Presentation Narrator scripting syntax. The Presentation Narrator doesnt do anything with comment lines except ignore them. Comment lines can be used by script authors to make notes for themselves, provide some formatting to separate lines in the script or a variety of other purposes. Syntax ! text

Part Text

Description Optional. This can be anything that you want (or nothing at all).

Example ! This is a comment line. Remarks Note that there isnt a COMMENT command similar in format to the other commands in the Presentation Narrator scripting syntax. Also, the symbol used to indicate a comment line is different from that used by Microsoft Visual Basic and its different variants. -------------------------------------------------------END command Description This command will hide the Microsoft Agent character being used as the Presentation Narrator and also stop the processing of any scripting commands that follow it on the Notes Page. Syntax END Example END Remarks This command differs from the Hide command below as subsequent commands in the script will not be processed. It effectively terminates the narration for the presentation. See Also

HIDE command. -------------------------------------------------------HIDE command Description Hides the Microsoft Agent character being used as the Presentation Narrator. Syntax HIDE Example HIDE Remarks Any scripting commands that follow it on the Notes Page will continue to be processed. This differs it from the END command described above. See Also END and SHOW commands. -------------------------------------------------------LOOP command Description Causes the Microsoft Agent character being used as the Presentation Narrator to play a looped animation for a specified duration of time. Syntax LOOP time=animation

Part Time Animation

Description Required. An integer value that specifies the approximate time duration to play the looping animation. Express this value in seconds. Required. The name of the looping animation (see the Animation list for the Microsoft Agent character being used as the Presentation Narrator) to be looped for the specified duration.

Example LOOP 3=Searching Remarks Due to the indeterminate multi-tasking, non-real-time nature of the supported operating systems platforms, the actual duration of time during which the animation will loop may not match the supplied valued nor be consistent from instance to instance. Use the SLIDE command to loop back to a previous presentation slide. The LOOP command is used solely for playing an animation for a specified period of time. See Also

The Animation lists for the Microsoft Agent characters supplied by Microsoft at the Microsoft Agent Web site, http://www.microsoft.com/msagent. -------------------------------------------------------MOVE command Description Moves the Microsoft Agent character being used as the Presentation Narrator to the specified screen location. Syntax MOVE x, y

Part X

Description Required. An integer value that indicates the left edge of the animation frame of the Presentation Narrator character. Express these coordinates as a percentage of the full screen (omitting the percent sign). Required. An integer value that indicates the top edge of the animation frame of the Presentation Narrator character. Express these coordinates as a percentage of the full screen (omitting the percent sign).

Example MOVE 50, 50 Remarks The location of the Presentation Narrator character is based on the upper left corner of its frame. For ease of scripting, the VBA code normalizes the screen location to 100% of the full screen resolution. The supplied x and y integer values may only yield approximate results. Fine tuning adjustments may be required in your Notes Page scripts. -------------------------------------------------------NEXT command Description If you are using Microsoft PowerPoints Custom Animation capability to animate text and objects on the slide, this command advances to the next text or object in the build of the presentation slide. Syntax NEXT Example NEXT Remarks If there are no (more) text or objects to build on the slide, the presentation will advance onto the next slide following the current one. However, the narration will still continue with any

remaining command lines in the script of the previous slide. Depending upon those command lines, processing and execution may not continue onto the script of the now current slide. If the last slide is currently displayed, this command closes the Slide Show. If the End with black slide check box on the View tab of the Options dialog box (Tools menu) is selected, the black slide is treated as the last slide. See Also SLIDE command. -------------------------------------------------------PLAY command Description Causes the Microsoft Agent character being used as the Presentation Narrator to play the specified animation. Syntax PLAY animation

Part Animation

Description Required. The name of the non-looping (see the Animation list for the Microsoft Agent character being used for the Presentation Narrator) animation to be played.

Example PLAY Greet Remarks Do not use this command to play looping animations (see the Animation list for the Microsoft Agent character being used as the Presentation Narrator). Doing so will cause the Microsoft Agent character to be stuck in the looped animation and not advance to the next script command. Use the Loop command to have the Presentation Narrator play looping animations. See Also The Animation lists for the Microsoft Agent characters supplied by Microsoft at the Microsoft Agent Web site, http://www.microsoft.com/msagent. -------------------------------------------------------RUN command Description This command enables you to run an executable program from within your Presentation Narrator script. Syntax RUN pathname

Part Pathname

Description Required. The name of the program (including directory or folder and drive) to execute and any required arguments or command-line switches.

Example RUN notepad.exe Remarks The executable program will open with focus and its most recent size and position. The window of the start program will display in front of the presentation slide. The character being used as the Presentation Narrator will still be in front of this new window. The RUN command runs other programs asynchronously. This means that subsequent command lines in the Presentation Narrator script will continue to be processed without waiting for the started program to complete. Also, there is no means provided to pass data collected from the started program to the Presentation Narrator. -------------------------------------------------------SAY command Description Causes the Microsoft Agent character being used as the Presentation Narrator to output the specified text as audio and within a word balloon that appears onscreen. Syntax SAY text

Part Text

Description Required. The words to be spoken and displayed within the word balloon by the Microsoft Agent character being used as the Presentation Narrator.

Example SAY Hello, I am pleased to meet you. Remarks While long strings of text can be used within a single command, it may be preferable to split these into multiple SAY commands. There may be occasions when the text-to-speech engine being utilized does not properly pronounce a word within the text string. In these cases, you can supply a phonetic substitution in the following form: {phonetic=literal}

Part Phonetic

Description Required. A phonetic spelling with the desired pronunciation for the substituted word, name or phrase.

Literal

Required. The literal word, name or phrase to be displayed in the word balloon. This is not used by the text-to-speech engine.

These phonetic substitutions can be especially useful for handling abbreviations, specific terms, foreign languages, etc. e.g. SAY I am the Presentation Narrator for {em ess=MS} Agent ------------------------------------------Also, you can vary the intonation of the speech output with special tags that you include in the Text parameter. The description, syntax and examples of these special tags follow. Use the Emphasis tag immediately preceding a word in order to place emphasis upon its pronunciation. This should take the following format: ^EMPHASIS^word Do not place a space between the Emphasis tag and the target word. e.g. SAY I couldnt care ^EMPHASIS^less whether you jump. ------------------------------------------Use the Monotone tag to change the Text-to-Speech generated output to a monotone voice in character. This should take the following format: text ^MONOTONE^ more text The Monotone tag remains in effect for the remainder of the text of the current command line unless followed by a Normal or Whisper tag. e.g. SAY You are turning into such a ^MONOTONE^ robot worker. ------------------------------------------Use the Whisper tag to change the Text-to-Speech generated output to a whispered voice in character. This should take the following format: text ^WHISPER^ more text The Whisper tag remains in effect for the remainder of the text of the current command line unless followed by a Monotone or Normal tag. e.g. SAY To get someones attention, ^WHISPER^ just whisper. ------------------------------------------Use the Normal tag to reset the Text-to-Speech generated output back to a normal voice. This should take the following format: text ^NORMAL^ more text The Normal tag remains in effect for the remainder of the text of the current command line unless followed by a Monotone or Whisper tag. e.g. SAY Just ^WHISPER^ whisper ^NORMAL^ to get someones attention. -------------------------------------------

Use the Address tag to specify the context of the text that follows, which determines how abbreviations and symbols will be spoken by the Text-to-Speech generated output. This should take the following format: text ^ADDRESS^ more text The Address tag remains in effect for the remainder of the text of the current command line unless followed by an E-mail or NoContext tag. e.g. SAY Please send it to my ^ADDRESS^ New York, NY address. ------------------------------------------Use the E-mail tag to specify the context of the text that follows, which determines how abbreviations and symbols will be spoken by the Text-to-Speech generated output. This should take the following format: text ^E-MAIL^ more text The E-mail tag remains in effect for the remainder of the text of the current command line unless followed by an Address or NoContext tag. e.g. SAY Just send a message to my ^E-MAIL^ Microsoft.com address. ------------------------------------------After an Address or E-mail tag, use the NoContext tag to reset the context of the text that follows and will be spoken by the Text-to-Speech generated output. This should take the following format: text ^NOCONTEXT^ more text The NoContext tag remains in effect for the remainder of the text of the current command line unless followed by an Address or E-mail tag. e.g. SAY ^E-MAIL^ microsoft.com ^NORMAL^ sounds better than microsoft.com. ------------------------------------------Dramatic pauses may be inserted into the text string. These should take the following form: ^PAUSE=time^ where time is a value in milliseconds. e.g. SAY I was just thinking, ^PAUSE=1500^maybe its time to pay my bills. Note: Due to the indeterminate multi-tasking, non-real-time nature of the supported operating systems platforms, the actual duration of time during which speech will be paused may only be approximate or vary from instance to instance. Using small values for this duration may not result in discernible pauses. ------------------------------------------The speaking volume of the speech output can be set with a special tag of the following form: ^VOLUME=number^ where number is the speaking volume with 0 being silence and 65,535 as the maximum. e.g. SAY People listen more intently ^VOLUME=64^ when you speak quietly.

------------------------------------------The pitch of the speech output can be set with a special tag of the following form: ^PITCH=number^ where number is the pitch in hertz.. e.g. SAY If you inhale helium gas, ^PITCH=500^ your voice will sound like this. ------------------------------------------The average talking speed of the speech output can be set with a special tag of the following form: ^SPEED=number^ where number is the average talking speed, in words per minute. e.g. SAY I speak ^SPEED=60^ kind of slow, first thing Sunday mornings... ------------------------------------------The volume, pitch, and speed speech output tags stay in effect for the remainder of the SAY command line unless reset with a special tag of the following form: ^RESET^ It is acceptable to use multiple speech output tags in the same SAY command line. e.g. SAY ^SPEED=60^ Sunday mornings are slow ^RESET^ but things pick up later. See Also AUDIO, AUDIONOCAP, SAYNOCAP and THINK commands. -------------------------------------------------------SAYNOCAP command Description This command is similar to the previous SAY command except that the specified text does not appear onscreen as captioning within a word balloon of the Microsoft Agent character being used as the Presentation Narrator. The specified text is still output as audio by the text-tospeech engine. Syntax SAYNOCAP text

Part Text

Description Required. The words to be spoken (but not displayed within a word balloon) by the Microsoft Agent character being used as the Presentation Narrator.

Example SAYNOCAP Too bad youve lost your reading glasses. Let me read aloud to you instead. Remarks

Your script can freely alternate between SAY and SAYNOCAP commands. The specified text is handled independently for each command line. See Also AUDIO, AUDIONOCAP, SAY and THINK commands. -------------------------------------------------------SHOW command Description Loads the designated Microsoft Agent character as the Presentation Narrator and appears at the specified screen location. Syntax SHOW character, character file, x, y

Part Character character file X

Description Required. A string value. Required. The character file with the character data to be loaded and provided as the file location or HTTP address for the specified characters definition file. Required. An integer value that indicates the left edge of the animation frame of the Presentation Narrator character. Express these coordinates as a percentage of the full screen (omitting the percent sign). Required. An integer value that indicates the top edge of the animation frame of the Presentation Narrator character. Express these coordinates as a percentage of the full screen (omitting the percent sign).

Remarks If a file path or URL address is not specified (i.e., only a file name is supplied), the default folder for Microsoft Agent characters will be assumed. The Microsoft Agent feature of dynamically loading individual animations is not supported by the Presentation Narrator. See Also HIDE command. -------------------------------------------------------SLIDE Command Description Advances to the specified slide within the current presentation upon completion of the supplied command. Syntax SLIDE slide=command

Part Slide Command

Description Required. The slide number within the current presentation that will be advanced to next. Required. The last command from the Notes Page of the current slide that will be executed. Upon completion of this command, the Presentation Narrator will advance to the specified slide and begin processing the scripted commands on its Notes Page.

Syntax SLIDE 3=SAY That is enough on this slide, lets move on. Remarks The slide number used is that derived from the slide order within the current presentation, known as SlideIndex in Microsoft PowerPoint parlance. The SlideID number within the Microsoft PowerPoint object model is not utilized. The slide number does not need to be the one for the next sequential slide. It is possible to specify a preceding slide as well. The command to be executed must be one of LOOP, MOVE, PLAY or SAY and conform to the appropriate scripting command syntax specified. See Also NEXT command. -------------------------------------------------------SOUNDFXOFF command Description Turns off sound effects included as a part of a characters animations when an animation plays. Syntax SOUNDFXOFF Example SOUNDFXOFF Remarks Sound effects are enabled by default. This command only applies to the current character. See Also SOUNDFXON command. -------------------------------------------------------SOUNDFXON command Description Turns on sound effects included as a part of a characters animations when an animation plays. Syntax SOUNDFXON

Example SOUNDFXON Remarks Sound effects are enabled by default. This command only applies to the current character. See Also SOUNDFXOFF command. -------------------------------------------------------SUSPEND command Description Stops execution of the Presentation Narrator scripting in the Notes Page. This suspension lasts indefinitely until you select Resume from the shortcut menu of the character. Syntax SUSPEND Example SUSPEND Remarks If you are still on the same slide, script execution will resume from the next command line. If there are no other command lines in the script, the character will announce that it is finished executing this script and suggest that you manually advance the presentation to another slide. If you choose not to do so and select resume again, the script for the current slide will be executed again from the beginning. If you advance or regress to another slide, execution will resume from the beginning of the script for that slide. You can also use the SUSPEND command in conjunction with the SLIDE command, as in: SLIDE 3 = SUSPEND When you resume the narration, the presentation will automatically advance to the specified slide. See Also RESUME command. -------------------------------------------------------THINK command Description Displays the specified text for the Microsoft Agent character being used as the Presentation Narrator in a thought word balloon that appears onscreen. No audio is output with this command. Syntax THINK text

Part Text

Description Required. The words to be displayed within the thought word balloon of the Microsoft Agent character being used as the Presentation Narrator.

Example THINK I really dont know what to make of the diagram on this slide... Remarks The thought word balloon differs visually from that displayed by the SAY command. See Also SAY and SAYNOCAP commands. --------------------------------------------------------

Scripting Examples
The following examples illustrate the scripting utilized by the Presentation Narrator for Microsoft Agent. An example of the scripting added to the Notes Page of a narrated presentation. ^*#{}#*^ SHOW merlin, merlin.acs, 98, 75 SAY Hello. Please allow me to introduce myself. PLAY Greet PLAY Explain SAY I am Merlin, one of the Microsoft Agent animated characters. SLIDE 3=SAY I can be used for a multiplicity of purposes. Upon completion of the last command above, the presentation will automatically advance to the third slide and begin processing the following scripting on its NotesPage. ^*#{}#*^ SAY Im willing to relocate to wherever Im needed. MOVE 50,50 SAY Did I mention that Im a determined worker? SAY I will stay with a problem LOOP 8=Processing SAY Until I have a solution worked out for you. PLAY Congratulate SLIDE 6=SAY But wait! Theres more The presentation will now proceed to and continue with the sixth slide.

Scripting Cautions
Be careful with the scripting that you write in the Notes Page. The code underlying the Presentation Narrator may not be entirely forgiving. For example, if the syntax described for a command states that a parameter is required (e.g. SAY or THINK), that means you really should supply something as text to pass

to those commands, even if it is just a period punctuation mark. Failing to do so, may result in an ungracious error that will be made obvious to you (and your audience). Re-arranging the order of your slides, and adding or deleting slides may wreak havoc upon your presentations scripting. For your own sake, please test your scripting and presentation entirely from start to finish before running it in front of your intended audience. The magic marker of ^*#{}#*^ that separates your speaking notes from your narration script on the Notes Page must be inviolate. You cannot insert any characters or blank spaces within it. When you are using the special speech output tags, ensure there isnt an embedded space immediately following the first caret (^) symbol. For example, ^MONOTONE^ is correct while ^ MONOTONE^ would be incorrect. Spelling the command names and speech output tags correctly will help a lot. Spelling and grammar mistakes in the text that you supply to the narrator for output is acceptable though it may not reflect very well upon your command of the language. You must use upper case for command names and speech output tags. Consider this a formatting measure to keep your scripts readable. Do not use the word SLIDE in upper case letters in the text that you supply to the narrator for output. Using Slide or slide is acceptable. If your script does not run correctly, try testing its execution by incrementally adding a line at a time. Yes, this may be tedious but there are no debugging tools to step through the script. Once you have isolated the line of the script that is not executing correctly, check for embedded, leading or trailing spaces and different combinations of preceding and following lines. Irregularities may be due to parsing errors in the code of the Presentation Narrator. If you have multiple SLIDE commands within the script of a Notes Page, only the first one will be parsed and executed. All subsequent SLIDE commands are ignored. There is no branching or logic syntax available at present within the Presentation Narrator. Please send e-mail (preferably with examples) if you think this would be useful functionality for future implementation. Be careful not to select Hide from the shortcut menu when you intended to select Suspend instead. Ordinarily, you will not be able to resume the narration from that slide or a subsequent one. However, you can use one of the tips from the following Scripting Tricks section of this document. Go back to the first slide with scripted narration again and start it up. Once the character appears onscreen, suspend the narration from the shortcut menu then move to the slide that you want to resume from and then select Resume from the shortcut menu. On a minor usage note, when you suspend the narration from the shortcut menu, the Presentation Narrator has the focus. Before you can proceed to advance through your presentation slides, you have to click on the slide first to give the focus back to Microsoft PowerPoint. Alternately (and less cumbersome), you can prepare each scripted slide to begin the Narration. Just place an invisible shape on each slide with a Mouse Over Action Setting to trigger the Narration code and start each script with a SHOW command. In ordinary use, the Mouse Over events and SHOW commands will just be ignored by the running narration. If you have accidentally ended the narration though, your advance preparation will enable you to begin that slide over again. The WAIT command is different than the SUSPEND command which is different from the PAUSE speech output tag. Each has a different use and purpose. The WAIT command allows you to script a duration of time when script execution will be halted. The SUSPEND command enables you to stop script execution indefinitely at a certain pre-defined point in the script (or dynamically by selecting SUSPEND from the narrators right mouse button shortcut menu). The PAUSE speech output tag allows you to script a brief pause in the narration text. Some text-to-speech engines may incorrectly interpret the last word of a sentence (i.e. one immediately followed by a period) as an abbreviation. A sentence like I need to go in. could result in speech output of I need to go inch. In these cases, you can use phonetic substitution {inn=in} to work around the error. Dont use some characters like ellipsis (i.e. a string of three successive periods ) within the Text parameter of a SAY command in your script. Microsoft PowerPoint seems to automatically convert these into a special character code which will show up as an extended ASCII character in your word balloon

Be careful when using the ampersand (&) character within the Text parameter of a SAY command in your script. The speech output will be correct but the text following the ampersand will not display in the word balloon. You can use the phonetic substitution {and=& } as documented in the SAY command but be sure to include two blank space characters following the ampersand character in the literal part.

Scripting Tricks
Now that weve gotten through the warnings and cautions, here are a few scripting tricks to try with the Presentation Narrator. The Presentation Narrator can be used in a kiosk environment where it loops repeatedly and endlessly (or until manually intervened). Use SLIDE as the last command of the last slide of the presentation to loop back to the first (or a previous) slide. While testing your script, you can follow along with it in the Notes Page as the narration is running. Use the Alt-Tab key combination to make its window visible. The Microsoft Agent character will still display on top of this window. If you dont use the SLIDE command at the end of the script of a Notes Page, the Presentation Narrator will automatically be paused at the completion of the last command. This is useful if you have previously determined that you want to advance to the next slide manually and present it yourself. You can then resume the narration again on a subsequent presentation slide from the Microsoft Agent characters shortcut menu. Also, you can use the slide resume trick described above when you are testing your Notes Page script for the eighteenth slide and dont want to wait through the script playback for the intervening slides. The NEXT command can be useful on a slide that is built up from animated text and objects that sequentially appear onscreen. This command allows you to synchronize the build of the animated text and objects with your Presentation Narrator character and script. You can also use it to advance to the next slide of your presentation. Please note there is a difference between a HIDE command in the script and selecting Hide from the rightclick shortcut menu of the character being used as the Presentation Narrator. The former will only hide the character but the latter user action will also cease processing of the scripted narration. Ordinarily, if you end the narration on a slide with either an END command in the script or selecting HIDE from the right-click shortcut menu of the narrator, you will not be able to start narration on a subsequent slide of the presentation again. However, you can start another narration on a subsequent slide of your presentation. Just begin another script with a SHOW command as usual and then add a shape to that slide with an Action Setting that will run the Narration code on a Mouse Over event. If youre not certain how to accomplish this second step with Microsoft PowerPoint, you can also copy and paste the invisible shape from the first narrated slide of your presentation. There is a lot of flexibility and functionality natively programmed into Microsoft Agent. The Presentation Narrator condenses and integrates this with Microsoft PowerPoint for simple, easy authoring of the narration. There are native Microsoft Agent capabilities that are not documented here but are still available with the Presentation Narrator. An example of this is the ability to designate alternative strings within the Text parameter of the Microsoft Agent Speak Method using the vertical bar character (|) as a separator. The SAY command of the Presentation Narrator still supports this functionality. Each time the following SAY command line is run, one of these variations will be randomly selected for output: e.g. SAY Hello everyone.|Hi yall!|Hey, hey, hey Microsoft Visual Basic programmers have even more capability with the Presentation Narrator than what is documented here. There is a bookmark tag, ^MARK^, that you can use in the text supplied in SAY and SAYNOCAP commands. These bookmarks arent accessible from the scripting syntax but Microsoft Visual Basic programmers can add their own event handlers to the Presentation Narrator VBA code. These will execute when the narrators reach those bookmarks in the text that they output. Programmers could use these to make all sorts of things happen inside (and even outside) Microsoft PowerPoint. For additional information, refer to the documentation in the VBA code of the Presentation

Narrator (the ProcessLine function in the Main module and AgentCtl_Bookmark sub-routine in the clsAgent class module). You can use more than a single character for the narration of a presentation. You can easily replace one character being used as the Presentation Narrator with another character by simply scripting a HIDE command followed by another SHOW command. The sequence of command lines would be something like the following: SHOW merlin, merlin.acs, 50, 50 HIDE SHOW genie, genie.acs, 50, 50 The following section of this document describes how you can use multiple characters simultaneously in your presentation.

Using Multiple Characters Simultaneously


All of the preceding documentation and examples were written assuming only a single character is used at a time to narrate a presentation. You can also have multiple characters simultaneously onscreen in a presentation. Ordinarily, if only a single Microsoft Agent character is scripted as the Presentation Narrator, then you can just use the command line scripting syntax as described in the previous sections of the documentation. When more than one Microsoft Agent character are used, precede the command lines with the digit (from 1 to 6) corresponding to the specific character when it was first loaded, followed by a right parenthesis ). The following is a succinct example of loading two charcters: SHOW merlin, merlin.acs, 50, 50 SAY Before we begin, please welcome my friend, Peedy. 2) SHOW peedy, peedy.acs, 65, 50 If a number and right parenthesis are not provided in the script, then the number one and a single character are always assumed. The following is a short, fragmentary example illustrating the use of three simultaneous characters: SHOW merlin, merlin.acs, 50, 50 SAY Before I begin, please welcome my friend, Peedy. 2) SHOW peedy, peedy.acs, 65, 50 2) PLAY GREET 2) SAY Hello and Id like to introduce Genie. 3) SHOW genie, genie.acs, 80, 50 3) SAY Hi, and now, back to you Merlin. SAY Can I get on with the presentation, please? 3) HIDE SLIDE 5 = 2) HIDE The command lines for each character will be run synchronously (i.e. sequentially) one after another. It is also possible to specify that the following command line should be processed and executed immediately without waiting for the current command line to complete first. The syntax for this immediate execution mode is to append a special tag of <+> to the end of the current command line. Here is the previous example again but with a smoother, more spontaneous sequence of interaction: SHOW merlin, merlin.acs, 50, 50 SAY Before I begin, please welcome my friend, Peedy.<+> 2) SHOW peedy, peedy.acs, 65, 50 2) PLAY GREET

2) SAY Hello, and Id like to introduce Genie.<+> 3) SHOW genie, genie.acs, 80, 50 3) SAY Hi, and now, back to you Merlin. SAY Can I get on with the presentation, please?<+> 3) HIDE<+> SLIDE 5 = 2) HIDE Note, this immediate execution mode should be used judiciously. There is no benefit to using this mode within a sequence of command lines for a single character. They will be processed and executed one after the other anyway. This immediate execution mode should only be used between two command lines for different characters. Caution must be exercised when using this mode since only one character can output audio at a time. Using this mode will not circumvent this restriction and allow two characters to be speaking audibly at the same time. In this situation, the first character will mute the audio output from the second. The word balloons will still display for both. Proper usage of this mode should allow multiple characters to play animations simultaneously or the case of one character speaking while another is playing an animation. Since some animations may also have sound effects, there may still be contention for the single audio output device. If necessary, move or remove the tag for immediate execution mode or insert (silent) play animation commands. Incorrect sample SAY No one can talk while I do.<+> 2) PLAY LookLeft 2) PLAY Surprised 2) SAY I insist on being heard Correct sample SAY No can talk while I do.<+> 2) PLAY LookLeft 2) PLAY Surprised PLAY RestPose 2) SAY I insist on being heard.

Caution is recommended as some characters have long animations with sound effects. This may be especially true with Show and Hide animations. Some fine tuning of your script may be necessary. Depending on the performance of your computer, having multiple characters playing animations simultaneously may overburden your system and result in less than smooth redraws of the screen behind the characters. The advantage of the special version of Microsoft Agent pre-installed in the Microsoft Windows 2000 operating system should become apparent in this situation. This special version of Microsoft Agent was written to use the new Layered Windows functionality exclusive to the operating system and provides superior performance and efficiency. The immediate execution mode can be used in conjunction with a LOOP command. This may also require caution and fine tuning. If you intend on scripting other characters while one is looping, it may be necessary to repeatedly use the immediate execution tag. Please refer to the following sample script fragments. Awkward sample LOOP 6 = Reading<+> 2) SHOW Peedy, Peedy.acs, 45, 45 2) PLAY Greet 2) SAY Hello, everybody. 2) SAY My name is Peedy. Smooth sample LOOP 6 = Reading<+> 2) SHOW Peedy, Peedy.acs, 45, 45<+> 2) PLAY Greet<+> 2) SAY Hello, everybody.<+> 2) SAY My name is Peedy.

In the sample on the left, Peedy doesnt continue playing animations or speaking immediately after he appears onscreen. In the sample on the right, several command lines are processed and executed by Peedy while the first character is playing the looped animation.

The immediate execution mode tag should not be used with END or SUSPEND commands or the last line of a slides script. It doesnt make much sense to use this tag with the WAIT command. If there are multiple characters onscreen, you can Suspend or Resume the Presentation Narrator with the corresponding selection from the shortcut menu of any one of the characters. If your presentation calls for more than six characters onscreen simultaneously, this can be accommodated with just a few minor changes in the VBA code Presentation Narrator. The changes that are necessary are indicated in the code.

Adding Presentation Narrator to an Existing Presentation


The PresentationNarrator.ppt presentation provides a sample of the narration scripting applied to a presentation about Microsoft Agent and its possible uses. This presentation and narration were created as an example of how the Presentation Narrator can be used. It is more likely that you will be using the Presentation Narrator to augment a presentation of your own content. The easiest way to accomplish this is to copy your own slides into one of the existing Presentation Narrator documents and then removing the ones originally there. A (mostly) blank Presentation Narrator document, EmptyTemplate.ppt is also provided for this purpose. Use whichever you prefer as a starting point to replace with your own slides and scripting. Adding the Presentation Narrator code and functionality to an existing presentation requires several steps and tasks that you may not be familiar with ordinarily. If you still choose to pursue this path, the steps and tasks are outlined below: 1. 2. 3. 4. 5. 6. Open your existing presentation in Microsoft PowerPoint. From the Tools menu, select Macro and then Visual Basic Editor. The Visual Basic Editor will open. From the Tools menu, select References. Scroll down the list of Available References to Microsoft Agent Control 2.0 and then select the check box next to it. Click the OK button to add the reference to the Microsoft Agent control to the project. From the File menu, select Import File. Select the Main.bas file that you downloaded as part of the Presentation Narrator and then click the Open button to add its code into the project. Repeat this step for the clsAgent.cls and clsPpt.cls files. If you are creating a narrated presentation for use with Microsoft PowerPoint 97, you should import the Main97.bas, clsAgent97.cls and clsPpt97.cls files from the PresentationNarrator97 folder instead. Close the Visual Basic Editor. This will add the code and references for the Presentation Narrator to your presentation document. Back in Microsoft PowerPoint, you will now need a way to launch the code that you have just added. On the slide that you want to start the narration, add an AutoShape. From the Insert menu, select Picture and then AutoShapes. Select a shape to add by clicking on it in the resulting menu. Click on the slide to insert the selected shape and resize as desired. Right-click the AutoShape, and then click the Format AutoShape command on the shortcut menu. In the Format AutoShape dialog box, click the Colors and Lines tab to select it. Change the color of the AutoShapes border and fill as desired. To hide the AutoShape, select No Fill and No Line. Right-click the AutoShape, and then click the Action Settings command on the shortcut menu. In the Action Settings dialog box, click the Mouse Over tab to select it. Click Run macro and then select Narration in the list. Click the OK button.

7. 8.

9.

10.

11.

The presentation is now ready to be scripted and run. From the View menu, select Notes Page and then begin your scripting.

Your presentation should now be ready to run. You may want to test that your preparations have been successful before you do too much scripting. If you think you have followed the steps above correctly but the narration does not work correctly, you may want to check your scripting or failing this, use the recommended method of adding your slides to one of the existing Presentation Narrator documents that was initially described in this section.

Developing for Microsoft Agent Support


For additional or updated information about Microsoft Agent, visit the Microsoft Agent Web site at http://www.microsoft.com/msagent Customers can receive technical support for Microsoft Agent by calling 1-800-936-5800 (this is the developer support phone line). If you are an MSDN member, you can use one of your MSDN support incidents for this support. If you are not an MSDN member, you can choose the "pay-per-incident" option. You can also submit questions electronically through the Support Web site at http://www.microsoft.com/isapi/gosupport.asp?target=/support/ Note that this is also pay-per-incident unless you already have a support contract with Microsoft. To report Microsoft Agent bugs, please use the bug form at http://www.microsoft.com/workshop/imedia/agent/agentbugform.asp To contact the community of active Microsoft Agent developers, visit the public newgroup news:microsoft.public.msagent Note that Microsoft does not actively monitor this peer-to-peer support forum.

Credits
Of course, hats off to the Advanced User Interface Design group at Microsoft Corp., without whom the Presentation Narrator would not even exist. Additionally, much appreciation is due to Ian Wiese, who provided invaluable suggestions, ideas, (real world) testing, and code.

Potrebbero piacerti anche