Synopsis:
SMgetrecognised(vox_chan,timeout_10ths,&pType,&pParam0,&pParam1)
Arguments:
vox_chan – The voice channel
timeout_10ths – The time to wait for a recognition event
pType – Pointer to a variable that will hold the returned recognition event type
pParam0 – Pointer to a variable that will hold the returned recognition event parameter 0 data
pParam1 - Pointer to a variable that will hold the returned recognition event parameter 1 data
Description: This function waits for and returns details of a single recognition event that occurred as a result of a call to sm_wait_for() initiated by one of the functions such as SMctlPulse(), SMctlCPtone(), SMctlGrunt() and SMctlASR() (Note that SMctlDTMF causes DTMF digits to be copied to a separate channel buffer and should be retrieved using the SMwaittones() and SMgetttones() function instead).
If detection of pulse, CP tones, Grunt or ASR have been initiated through one of the above functions then this function can wait for and collect the received recognition events caused by detection of these events.
Only a signal recognition event at a time can be retrieved by this function and the timeout_10ths argument defines how long (in 1/10th seconds) that the function will wait before terminating with a TERM_TIMEOUT event. If there is already a recognition event in the channel buffer then the function will terminate immediately with a TERM_RECOG event and the variables pointed to by the pType, pParam0 and pParam1 will hold the information about the received recognition event.
The variable pointed to by the pType argument will be set to one of the following values as defined in ACULAB.INC:
# Recognition event types
const SMRecognisedNothing =0;
const SMRecognisedTrainingDigit =1;
const SMRecognisedDigit =2;
const SMRecognisedTone =3;
const SMRecognisedCPTone =4;
const SMRecognisedGruntStart =5;
const SMRecognisedGruntEnd =6;
const SMRecognisedASRResult =7;
const SMRecognisedASRUncertain =8;
const SMRecognisedASRRejected =9;
const SMRecognisedASRTimeout =10;
const SMRecognisedCatSig =11;
const SMRecognisedOverrun =12;
const SMRecognisedANS =13;
Note however that in the current version of the library the following recognition types will not be received:
const SMRecognisedCatSig =11;
const SMRecognisedANS =13;
Also the SMRecognisedDigit events are handled by the SMwaittones() and SMgetttones() functions and will not be returned by this function, and the SMRecognisedNothing event is ignored.
The variables pointed to by pParam0 and pParam1 will be set to values depending on the pType. See the Prosody Speech API guide for details (sm_get_recognised()) for details of what these parameters will be set to for each type.
Returns: Returns 0 upon success or negative error code.