Microsoft AgentMicrosoft Agent*
*Contents  *Index  *Topic Contents

Speech Output Tags

ActiveX™ Technology for Interactive Software Agents

agent

August 1997
Microsoft Corporation

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.

The Microsoft Agent services support modifying speech output through special tags inserted in the speech text string. These tags help you change the characteristics of the output expression of the character.

Speech output tags use the following rules of syntax:

Unless otherwise specified or modified by another tag, the speech output retains the characteristic set by the tag within the text specified in a single Speak method. Speech output is automatically reset through the user-defined parameters after a Speak method is completed.

Some tags include quoted strings. For some programming languages, such as Visual Basic® Scripting Edition (VBScript) and Visual Basic®, this means that you may have to use two quote marks to designate the tag's parameter or concatenate a double-quote character as part of the string. The latter is shown in this Visual Basic example:

Agent1.Characters("Genie").Speak "This is \map=" + chr(34) + "Spoken text" _
+ chr(34) + "=" + chr(34) + "Balloon text" + chr(34) + "\."

For C, C++, and Java™ programming, precede backslashes and double quotes with a backslash. For example:

BSTR bszSpeak = SysAllocString(L"This is \\map=\"Spoken text\"=\"Balloon text\"\\");

pCharacter->Speak(bszSpeak, ......);

For foreign languages that support double-byte character set (DBCS) characters, you can use double-byte characters to specify string parameters. However, use single-byte characters for all other parameters and characters that are used to define the tag, including the tag itself.

The following tags are supported:

Chr, Ctx, Emp, Lst, Map, Mrk, Pau, Pit, Rst, Spd, Vol

The tags are primarily designed for adjusting text-to-speech (TTS)-generated output. Only the Mrk and Map tags can be used with sound file-based spoken output.

Note: Microsoft Agent does not support all the tags documented in the Microsoft Speech SDK. Parameters may also vary depending on the TTS engine installed.

Chr Tag

Description

Sets the character of the voice.

Syntax

\Chr=string\

Part Description
string A string specifying the character of the voice.

"Normal" (Default) A normal tone of voice.

"Monotone" A monotone voice.

"Whisper" A whispered voice.

Remarks

This tag is supported only for TTS-generated output. The range of values for the parameter may vary depending on the installed TTS engine.


Ctx Tag

Description

Sets the context of the output text.

Syntax

\Ctx=string\

Part Description
string A string specifying the context of the text that follows, which determines how symbols or abbreviations are spoken.

"Address" Addresses and/or phone numbers.

"Email" Electronic mail.

"Unknown" (Default) Context is unknown.

Remarks

This tag is supported only for TTS-generated output. The range of values for the parameter may vary depending on the installed TTS engine.


Emp Tag

Description

Emphasizes the next word spoken. This tag must immediately precede the word.

Syntax

\Emp\

Remarks

This tag is supported only for TTS-generated output. The range of values for the parameter may vary depending on the installed TTS engine.


Lst Tag

Description

Repeats last spoken statement for the character.

Syntax

\Lst\

Remarks

This tag enables a character repeat its last spoken statement. This tag must appear by itself in the Speak method; no other text or parameters can be included. When the spoken text is repeated, any other tags included in the original text are repeated, except for bookmarks. Any .WAV and .LWV files included in the text are also repeated.


Map Tag

Description

Maps spoken text to text displayed in the word balloon.

Syntax

\Map="spokentext"="balloontext"\

Part Description
spokentext A string specifying the text for spoken output.
balloontext A string specifying the text for word balloon output.

Remarks

This tag enables you to use different spoken text than that displayed in the word balloon.


Mrk Tag

Description

Defines a bookmark in the spoken text.

Syntax

\Mrk=number\

Part Description
number A Long integer value that identifies the bookmark.

Remarks

When the server processes a bookmark, it generates a bookmark event. You must specify a number greater than zero (0) and not equal to 2147483647 or 2147483646.

See Also

Bookmark event


Pau Tag

Description

Pauses speech for the specified number of milliseconds.

Syntax

\Pau=number\

Part Description
number The number of milliseconds to pause.

Remarks

This tag is supported only for TTS-generated output. The range of values for the parameter may vary depending on the installed TTS engine. The speech engine supplied with Microsoft Agent supports values from 10 (0.01sec) to 2550 (2.55sec).


Pit Tag

Description

Sets the baseline pitch of the output to the specified value in hertz.

Syntax

\Pit=number\

Part Description
number The pitch in hertz.

Remarks

This tag is supported only for TTS-generated output. The range of values for the parameter may vary depending on the installed TTS engine. The speech engine supplied with Microsoft Agent supports values from 50 to 400.


Rst Tag

Description

Resets all tags to the default settings.

Syntax

\Rst\


Spd Tag

Description

Sets the baseline average talking speed of the speech output.

Syntax

\Spd=number\

Part Description
number Baseline average talking speed, in words per minute.

Remarks

This tag is supported only for TTS-generated output. The range of values for the parameter may vary depending on the installed TTS engine. The speech engine supplied with Microsoft Agent supports values from 50 to 250.


Vol Tag

Description

Sets the baseline speaking volume of the speech output.

Syntax

\Vol=number\

Part Description
number Baseline speaking volume: 0 is silence and 65535 is maximum volume.

Remarks

The volume setting affects both left and right channels. You cannot set the volume of each channel separately. This tag is supported only for TTS-generated output.

uparrow.gifBack to list of tags


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.