Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Voice Operations

Voice operations discusses how to perform voice operations using IRAPI functions. These functions are used to play pre-recorded speech and to record speech from the caller.

Speech queuing

Voice coded speech data may be placed on the channel play queue from a file or an internal buffer. Play commences when the irEnd(3IRAPI) function is called. Coded speech [irPlay(3IRAPI) functions] and TTS [irSay(3IRAPI) functions] queuing or playing cannot be mixed. A call to irEnd() must be used between queuing different types of speech (voice or TTS). Play of one type of speech must be stopped before another type is queued for play.

Pre-recorded speech may be queued for play with any combination of the irFPlay(3IRAPI) or irLP(3IRAPI) functions. Speech stored in a voice file may be queued for play with the irFPlay() function containing the path name of the voice file. irFPlay() queues the entire contents of the file given for play. A portion of a file may be queued for playing by obtaining a voice file descriptor from irOpen() function and using it with the irPlay() function. The voice file descriptor may be positioned at any point in the file using irLSeek(3IRAPI) and passed to irPlay() with a length specification. This queues the portion of the open file for play. Speech stored in an internal buffer may be queued for play with the irBPlay() function.

The irSpeakChar() function may be used to queue a character string for play. The irSpeakNum() function may be used to play whole numbers. It does not support speaking numbers in the billions and trillions because most of these numbers do not fit into an integer variable. These functions also support speaking numbers and character strings with rising, falling, or total inflections.

Speech play and control

The following functions are used to control the actual playing of queued speech.

Note:
Applications should handle the possible denial or delay of voice resource allocation when irEnd() is used. Depending on the value of the IRP_RESOURCE_RETURNMODE parameter, irEnd() or irPlayResume() may return IRR_FAIL or IRR_PENDING if the voice resource is not immediately available.

Voice recording

The following functions are used to control voice recording.

© 2006 Avaya Inc. All Rights Reserved.