NAME
irFConvertTTS, irFConvertTTSChan, irBConvertTTS, irBFCon-
vertTTS - convert text to a speech coding algorithm
SYNOPSIS
#include <irapi.h>
int irFConvertTTS (int tag, const char *src_file, const char
*dest_file, int algorithm);
int irFConvertTTSChan (channel_id cid, int tag, const char
*src_file, const char *dest_file, int algorithm);
int irBConvertTTS (int tag, const char *src_buf, char
*dest_buf, int dest_size, int algorithm);
int irBFConvertTTS (int tag, const char *src_buf, const char
*dest_file, int algorithm);
DESCRIPTION
irFConvertTTS converts ASCII text from the source file
src_file to the specified algorithm algorithm and stores it
in the destination voice file (dest_file).
irFConvertTTSChan converts ASCII text from the source file
src_file to the specified algorithm algorithm and stores it
in the destination voice file (dest_file). The distinction
from the previous function is that channel based parameters
may be set to control the language (IRP_LANGUAGE), speed
(IRP_TTS_SPEED), and volume (IRP_TTS_GAIN). It is only sup-
ported by proxy TTS.
irBConvertTTS converts ASCII text from the source buffer
src_buf, assumed to be terminated with a '\0' character, to
the specified algorithm (algorithm) and stores at most
dest_size bytes of it in the destination buffer dest_buf.
irBFConverTTS converts ASCII text from the source buffer
src_buf, assumed to be terminated with a '\0' character, to
the specified algorithm (algorithm) and stores it in the
destinations file (dest_file).
Tag is a user supplied number that associates the conversion
function call with a subsequent event. The event is
returned in an event structure (ir_event_struct) that is
accessed by irCheck(3IRAPI).
Algorithm is a symbolically defined integer (IRA_*) that is
defined in irapi.h [see IrALGORITHMS(4IRAPI)].
EVENT
The IRE_CONVERT_DONE event is returned with the level one
modifier to indicate a successful or failed algorithm
conversion. tag is included with the event.
RETURN VALUE
IRR_OK is returned if the algorithm conversion request is
successfully initiated.
IRR_FAIL is returned if an error occurs.
IRR_PENDING is returned if no resources are currently avail-
able for text to speech conversion.
ERROR
irError is set as follows if an error occurs:
IRER_INVALID if the src_buf, dest_buf, src_file or dest_file
are invalid, if the dest_size is negative, or if the algo-
rithm is invalid
IRER_SYSERROR if a driver call or system call failure occurs
(see errno for additional information)
IRER_RESOURCEBUSY if there are no resources available and
return mode is set to IRD_IMMEDIATE.
IRER_NORESOURCES if there are no resources in existence
CAVEAT
All algorithms (IRA_*) may not be supported by all IRAPI
implementations. Use irQueryResource(3IRAPI) to check sup-
port for a specific algorithm. Currently the only algorithm
supported for TTS conversion is IRA_P, 64 K Pulse Code Modu-
lation (PCM).
Note that algorithm conversion is not associated with any
cid.
SEE ALSO
irSay(3IRAPI), irConvertAlgorithm(3IRAPI) and
IrALGORITHMS(4IRAPI)
NOTE
The irBConvertTTS function is presently unsupported.
VERSION
This is version 8/31/00 of this man page.