Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Voice coding instructions

Voice coding instructions provide script facilities for adding or removing phrase numbers to or from a selected speech file. These instructions also store speech within these or previously defined phrase allocations. These facilities may be used, with suitable script prompts, to record user voice or touch-tone messages.

The feature of ending the voice coding session by pressing a touch-tone key (referred to as talkoff) can be disabled using tflush(1) before the vc instruction. This allows the user to encode the touch tones as well as the speech. See Voice Output Instructions for details about the tflush instruction.

The voice coding instructions are described below. Following these is an example of a script for voice coding and play.

Note:
If there are two phreserve instructions, there must be a vc instruction between them or the second phreserve instruction fails.

When both type.talk and type.phrase are -1, both a phrase id and talkfile id are chosen by the system and returned in r.1 and r.0, respectively. These selections start with the largest previously unassigned phrase number of talkfile 255. Subsequent phrase selections fill unused phrases of talkfile 255 toward phrase 0. Since r.0 and r.1 can be used implicitly to store talkfile or phrase ids, the script writer must take care to save the contents of these registers before the phreserve command is executed.

If type.phrase matches the phrase id in the specified talkfile, the existing phrase is replaced by the new phrase. The values 0 and -1 for the type.time argument indicate that the phreserve instruction should not allocate any space. If enough space is available to store the phrase when coding ends, the phrase is stored. If there is not enough space, an error message is issued from the vc instruction.

If the instruction is completed successfully, the return values are talkfile id in r.0 and phrase id in r.1. If the instruction is not completed successfully, the return value in r.0 is negative.

In This Section

Sample script using voice coding instructions

� 2002 Avaya Inc. All Rights Reserved.