Sample of Use

ORIGINAL SENTENCE (aka “Entry”)

==CV_ SENT001
[0] Please hold while I try the operator.
[1] Please hold while I try <PT_Mbox_Owner_Name#2> .
[2] Please hold while I try <numberAftNounDigitByDigit|N1|#3> .
[3] Please hold while I try the guest.
[4] Please hold while I try the administrator.
[5] Please hold while I try the fax machine.

NOTE: “Sentence” is simply a name for the unit. Does not indicate text with subject-verb. The System Localizer treats all data equally – text sentences, paragraphs, concatenated sentences, pictures (jpg, tif, gif, etc), videos, Flash, screen appearance, and other features. Each separate instance that is referenced by code is called a “sentence”, whether is pages of information or a the name of a video file.

TALENT SCRIPT PROMPT BREAKDOWN

Abbreviated audio file names    (if voice files stored by language)

NOTES:
•    The variable is included in the script in the right column, so that a script is easier to verify
•    The DB is normalized by sentence, meaning that when a prompt is repeated, such as “please hold while I try”, the same audio file is played, rather than making 2 identical recordings for the same” sentence”.
•    This script is not “fully normalized”. Meaning, if “Please hold while I try” appears in another sentence in the script, it will NOT re-use the SENT001 audio file. If it did, and SENT001 was removed, the re-use sentence would cease to function.

PREP CODE (WRAPPER) CALL TO THE RUNTIME ENGINE

/******************************************************************************

‘Licensor Confidential’ (‘CONFIDENTIAL INFORMATION’)
@International Services, Inc. 770.414.6000
GlobalConcat System Localizer

******************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include “td.h”

#define SIZ_VOXBUF (255)

struct diagnostic_r grDiag;

/***************************************************************************
Parameters:
cpSentence i:null terminated string: sentence name
cpLanguage i:null terminated string: language
iNumber1
cpPassThru
cpNumber2
ipErr o:return code td_getPrompts() call if NULL returned

Returns:
0xNNNN:address of buffer containing a CSV list (C string) of voice files
NULL: error or not found, check *ipErr vs. tableDriver.h return codes
from td_getPrompts().

IMPORTANT NOTE: the buffer returned by this function (if not NULL) must be
freed by the caller. Failure to do so will cause a memory leak in the
client application if this function is called repeatedly.

****/
char *
td_getPrompts_N_PT_ND(char *cpSentence, char *cpLanguage, int iNumber1, char *cpPassThru, char *cpNumber2, int *ipErr)
{
struct tableDriver_r rTD; // top level container for request data
struct lang_r rLanguage;
struct variable_r raVariable[3];
int iRv;

memset(&rTD, 0, sizeof(rTD));
memset(&rLanguage, 0, sizeof(rLanguage));
memset(raVariable, 0, sizeof(raVariable));

rTD.cpOutVox = (char *)calloc(SIZ_VOXBUF+1, sizeof(char));
if (rTD.cpOutVox == NULL)
{
printf(“Error:malloc failure\n”);
return (NULL);
}
rTD.iSizOutVox = SIZ_VOXBUF+1;
rTD.iLenOutVox = 0;

rTD.cpSentence = cpSentence;
rLanguage.cpLanguage = cpLanguage;
rLanguage.iLenLanguage = strlen(cpLanguage);
rTD.rpLanguageList = &rLanguage;

raVariable[0].iVariableType = CVTYPE_NUMBER;
raVariable[0].iNumber = iNumber1;
raVariable[0].rpNext = &raVariable[1];

raVariable[1].iVariableType = CVTYPE_PASS_THROUGH;
raVariable[1].cpVoxName = cpPassThru;
raVariable[1].iVoxLen = strlen(cpPassThru);
raVariable[1].rpNext = &raVariable[2];

raVariable[2].iVariableType = CVTYPE_NUMBER_DIG_BY_DIG;
raVariable[2].cpNumber = cpNumber2;

rTD.rpClientVariables = raVariable;

iRv = td_getPrompts(&rTD, &grDiag);
if (iRv != 0)
{
if (ipErr)
*ipErr = iRv;

free(rTD.cpOutVox);
rTD.cpOutVox = NULL;
}

return(rTD.cpOutVox);
}