Avaya Logo

Home

Previous Topic

Next Topic

Book Contents

Book Index

Voice output instructions

In this section, instructions that control speech output are described. These instructions send voice data to the telephony cards. Each description is followed by a brief example using that instruction. An example at the end of this section illustrates how the instructions described here might be used in a script.

Inflection

One Phrase

Multiple Phrases

r

Rising

Rising on first, medial on others

m

Medial

Medial on all

f

Falling

Falling on last, medial on others

t

Falling

Rising on first, falling on last, medial on others

The following example of the tchars instruction directs the script to speak the contents of INITIALS with falling inflection on the last character and medial inflection on all other characters.

tchars(INITIALS,'f')

Note:
The tnum instruction does not interpret numeric values in any language other than English because the rules for concatenating numbers varies depending on the language. The Enhanced Basic Speech package currently includes numbers 1-20, 30, 40, 50, 60, 70, 80, 90, 100, 1000, and 10000. This method forms numbers by combining these standard phrases.

The tnum instruction uses the same arguments for inflection as the tchars instruction.

The tnum instruction does not support speaking numbers in the billions and trillions because most of these numbers are too big to fit into an integer variable. However, the phrases billion and trillion are included in the Enhanced Basic Speech package. If your script requires such large numbers, we suggest that you start with an ASCII string, parse the string (getting the amounts of billions and trillions as substrings), then convert the three resulting substrings to integer values and speak them with the tnum instruction. Insert a talk instruction with the phrase for trillion or billion, where appropriate.

In the following example, the tnum instruction tells the script to speak the numeric value of int.FOUR with falling inflection on the last character and medial inflection on all other characters:

load(int.FOUR, 4)
tnum(int.FOUR,'f')

Argument

Value

Value Result

must_hear_flag

0

Touch tones entered during play or voice coding cause play or voice coding to stop (default).

 

1

Touch tones entered during play or voice coding do not cause play or voice coding to stop.

wait_indicator

0

Wait for the play to complete before continuing script execution (default).

 

1

Do not wait for the play to complete. Continue script execution immediately after queuing.

remember_flag

0

Remember phrases played by this instruction so they may be played again with the talkresume instruction.

 

1

Do not remember the speech.

The must_hear_flag option, when set to a non-zero value, disables talkoff so that speech activity (voice play or voice coding) on the current channel is not stopped by touch tones. When this option is used with speech play-related instructions (talk, tnum, tchars), a tflush(1) should follow those instructions. When using tflush with voice coding (vc), tflush(1) should precede the vc instruction. The talkoff is enabled automatically by the next wait-causing instruction in the script.

Note that if talkoff is disabled, speech play may interfere with incoming touch tones. Unless the setttfl instruction is used to enable the type-ahead feature, playing new speech causes any touch tones that have been typed up to that point to be deleted.

The tflush wait_indicator option, when set to a non-zero value, allows the script to start a play, then continues script execution immediately without waiting for completion of the play. By using a wait_indicator of 0, which is the default, the script does not start execution until a play complete message is received.

The tflush instruction stores a return value in register 0. If the value is negative, an error has occurred. If the value is +1, the play complete was caused by talkoff. If the value is 0, play completed successfully.

The following are examples of the tflush instruction:

talk("You must hear this announcement before continuing")
tflush(1)
/*does not end play if caller enters a */
/*touch tone*/

tflush(1) /*do not end coding if user enters touch */
/*tones*/

vc('b',10,ADPCM32)

Note:
In the second example, any touch tones entered are encoded along with the speech.

Note:
The talkresume instruction cannot be used to resume TTS play.

In This Section

Sample script using voice output Instructions

� 2003 Avaya Inc. All Rights Reserved.