Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Defining the speech tables

The language directory contains four tables that define the speech playback capability, two optional tables that define the text-to-speech (TTS) option, and a collection of TSM script routines that implement the various speech playback and TTS formats.

The format_tag file

The format_tag file lists the speech formats supported and the phrase tags required for each format. When a speech format is used by an application, all of the speech phrases listed in the format_tag file are added to the application. Phrase tags can be listed directly or a group name can be listed to refer to a collection of phrase tags. Phrase tag groups represent a collection of phrase tags, such as digits with rising inflection, and are defined in the tag_groups file (see tag_groups). Each format is defined as shown in the following example:

format (description of format) = {category1 phrase tag1

tag2

category2

"quoted tag" etc}

Each format definition must begin on a new line. The description of format argument is a description of the speech playback format. This argument should be less than 60 characters, but sufficient to identify the intended use of the format. The description of the format should be placed in parentheses immediately following the format name. Within the second set of brackets ("{" and "}") you should include the list of phrase tags and phrase tag groups that may be required to speak the format. Separate each phrase tag, phrase tag group, or both with white space, including blanks, tabs, and new lines; commas are not allowed. If you have a phrase tag that consists of multiple words with embedded white space, surround the phrase tag with quotes as shown in the format_tag example.

The tag_groups file

The tag_groups file lists groups of phrase tags and phrases in each group. Group names can consist of uppercase or lowercase alphanumeric characters and the characters "-," "_," "." Group names cannot have embedded white space. Each group is defined as shown in the following example:

groupname (description of group) = {tag1 tag2 tag3

"quoted tag" etc}

Each group must begin on a new line. The description of group is optional. You can add the groupname to the application before using the formats that might reference that group. Otherwise, the phrasegroup is not visible to you, and it is simply used to specify phrases for the format_tag file. The phrase tags within the second set of brackets are the phrase tags that are included in the phrase group. If you have a phrase tag that consists of multiple words with embedded white space, surround the phrase tag with quotes as shown in the tag_groups example.

The format_code file

The format_code file lists the supported formats and the code to be generated by the system for each format. Each format code description includes four fields as shown in the following example:

format code_for_numeric_args code_for_char_args

script_file

The format is identical to the format described in the format_tag file. The second field, code_for_numeric_args, contains the script code to be generated when a numeric field is being spoken. The third field, code_for_char_args, contains the code to be generated when a character, date, or time field is being spoken. The last field, script_file, contains the name of the script file containing the subroutines that must be included with the application, if any. If the code generated contains a call of a subroutine, then this field must list the file containing that subroutine. The file name, with no directories, is specified. The system automatically generates the directory name.

Only one line per format is allowed, even if the line wraps when displayed, as shown in the following example:

N$D2 "L__sp_dolc2 ($field) ""L__csp_dolc2 ($field) "_sp_
dolc2.t

Each field is separated by white space. If the code generated contains white space (spaces or tabs), the code must be surrounded by quotes. Parameter substitution occurs as follows:

Multiple script instructions can be included in one of the entries by separating them with a semicolon (;). Within the field, a backslash ( \ ) is used as an escape for quotes (or white space). Unused fields can have a "-" (dash) as a placeholder. The last two fields are optional.

If a numeric field is to be spoken with a format for which no numeric code is provided, the system generates code to convert the field to ASCII format (an itoa script instruction), and generates the code for character fields. Likewise, if a character field is to be spoken, but only numeric code has been provided, the system generates code to convert the numeric code and generates the specified numeric code.

The proto.pl file

The proto.pl file specifies the enhanced basic speech (EBS) phrase tags and their corresponding phrase numbers. The proto.pl file has the same format as a .pl file. See Phrase list file for EBS for more information about a .pl file.

The first field in each line of the proto.pl file is ignored. The first 999 phrase numbers (1-999) are reserved for standard phrases with fixed phrase number assignments. If a standard phrase does not need to be assigned a specific phrase number, then the proto.pl file can show phrase number 0 for the phrase. This causes the system to assign any available phrase number greater than 999 to the phrase and place it in the primary pool for the application. It is an error for a phrase to be listed in the format_tag or tag_group file and not be listed in the proto.pl file. However, phrases can be contained in the proto.pl file that are not currently referenced in the other files.

© 2006 Avaya Inc. All Rights Reserved.