NAME
irTF2File, irFile2TF - convert talkfile and phrase number
into file name
SYNOPSIS
#include <irapi.h>
char *irTF2File (long talkfile, long phrase_id);
int irFile2TF (const char *filename, long *talkfile, long
*phrase_id);
DESCRIPTION
irTF2File converts a talkfile and phrase_id pair into a UNIX
file name. This function is provided to support applica-
tions speaking phrases from old talkfile/phrase_id type
speech databases. A pointer to the resulting filename is
returned. The filename is constructed as follows:
{IRP_SPEECHDIR}/{talkfile}/{phrase_id}
IRP_SPEECHDIR is a parameter defined in
IrPARAMETERS(4IRAPI). talkfile and phrase_id are the com-
mand line arguments to irTF2File converted into ascii
strings suitable as directory and filenames.
This function may be used as file name input to the
irRecord(3IRAPI), irPlay(3IRAPI) and irOpen(3IRAPI) func-
tions.
irFile2TF converts filename into a talkfile and phrase
number pair. The "basename" of filename is converted into a
long placed into the address specified by phrase_id. The
"basename" of the "dirname" of filename is converted into a
long placed into the address specified by talkfile.
EVENT
No event results from the call to either irTF2File or
irFile2TF.
RETURN VALUE
For irTF2File, a pointer to the constructed file name is
returned if successful and IRR_NULL is returned if an error
occurs.
For irFile2TF a IRR_OK is returned if successful and
IRR_FAIL is returned if an error occurs.
ERROR
irError is set as follows if an error occurs:
IRER_INVALID if an invalid value for talkfile or phrase_id
is passed for irTF2File. For irFile2TF, if the basename of
filename and the basename of the dirname of filename contain
any non-digit characters.
SEE ALSO
irPlay(3IRAPI), irRecord(3IRAPI) and irOpen(3IRAPI).
VERSION
This is version 8/31/00 of this man page.