Avaya Logo

Home

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.

Argument

Description

type.phrase

Phrase id of the phrase to be created (valid range is 1-65,535).

type.talk

Talkfile id of the talkfile where the phrase is stored (valid range is 1-16,383).

type.time

Amount of space, or time (in seconds), to be reserved for a phrase in the talkfile.

type.style

Coding style and rate to be used. Valid coding styles and rates are defined in the header file codestyle.h in the directory /att/include. This file should be included in the script by an include instruction. If the style specified is not valid, the phreserve instruction fails.

If type.phrase is -1, the system assigns a phrase id and returns this id in r.1. The phrase id can be used to reference the phrase (for example, in a talk instruction) once it has been coded and stored in the talkfile by the vc instruction. If type.talk is -1, the system selects the default value 255 for the talkfile and returns the id of the selected talkfile in r.0.

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.

Value

Effective Timeout Value

X > 0

X becomes the timeout value

X = 0

Timeout is turned off

X < 0

Timeout is set to default value (5 seconds)

This instruction does not give a return value to indicate success or failure.

In This Section

Sample script using voice coding instructions

� 2003 Avaya Inc. All Rights Reserved.