NAME
irSpeakNum, irSpeakChar - functions for lingual playback
(LP) support
SYNOPSIS
#include <irapi.h>
int irSpeakNum (channel_id cid, int integer, int inflection,
int tag);
int irSpeakChar (channel_id cid, const char *string, int
inflection, int tag);
DESCRIPTION
These functions provide lingual playback (LP) support by
speaking numeric or character phrases in the correct manner.
The irSpeakNum function speaks an integer number with the
correct inflections while irSpeakChar speaks a alpha-numeric
string string with the correct inflection. Supported
inflections are IRD_INFLECTION_NONE, IRD_INFLECTION_RISING,
IRD_INFLECTION_FALLING and IRD_INFLECTION_TOTAL [see
IrDEFINES(4IRAPI)]. IRD_INFLECTION_TOTAL produces rising
inflection on the first phrase and falling inflection on the
last phrase if there are more than one. IRD_INFLECTION_NONE
produces no inflection.
These functions assume standard speech files from UNIX file
system directories are defined by the IRP_SPEECHDIR and
IRP_TALKFILE parameters.
The channel moves to the IRS_PLAY_QUEUED state if these
functions complete successfully. Multiple irLP functions
may be queued, intermixed with irPlay(3IRAPI) functions.
Play actually starts when irEnd(3IRAPI) is called.
EVENT
Since these functions are abstractions of irPlay(3IRAPI) and
its variants, the play does not actually start until
irEnd(3IRAPI) is called. An IRE_PLAY_DONE and possibly mul-
tiple IRE_PLAY_PROG events are then generated with the
appropriate modifiers [see IrEVENTS(4IRAPI)].
RETURN VALUE
The number of phrases required to accomplish the request is
returned if these functions are successful. This may be
useful for applications counting IRE_PLAY_PROG events.
IRR_FAIL is returned if an error occurs.
ERROR
irError is set as follows if an error occurs:
IRER_INVALID if the cid or inflection is not valid
IRER_SYSERROR if a system or driver call failure occurs (see
irSysError for additional information)
IRER_BADSTATE if the channel is not in the IRS_IDLE or
IRS_PLAY_QUEUED state
These functions do not check for the existence of standard
speech. If a voice file is not found, an error is logged by
the voice response output process (VROP).
SEE ALSO
IrDEFINES(4IRAPI), IrPARAMETERS(4IRAPI)
VERSION
This is version 8/31/00 of this man page.