Prosody speech processing: API: sm_get_recognised_ix
Prototype Definition
int sm_get_recognised_ix(struct sm_recognised_ix_parms *recogp)
Parameters
- *recogp
-
a structure of the following type:
typedef struct sm_recognised_ix_parms {
tSM_INT channel_ix; /* out */
enum kSMRecognition type; /* out */
tSM_INT param0; /* out */
tSM_INT param1; /* out */
} SM_RECOGNISED_IX_PARMS;
Description
The behaviour of this call is identical to that of
sm_get_recognised()
when invoked with
channel
set to kSMNullChannelId, except for the fact that
sm_get_recognised_ix()
returns a channel index in
channel_ix
(and not a channel identifier).
If no speech processing firmware hosted channel has any
recognised items,
channel_ix
will be set to -1 on return.
Application writers should bear in mind the fact that if this
call is invoked when no speech processing firmware hosted
channels are allocated at the time of the call,
sm_get_recognised_ix()
will return an error code ERR_SM_NO_SUCH_CHANNEL.
Fields
- channel_ix (Only in Prosody version 1)
- The channnel on which recognition occurred.
- type (Only in Prosody version 1)
- The recognition result. See the
type
field of
sm_get_recognised().
One of these values:
- kSMRecognisedNothing
- No digit, simple or call-progress tone has been
recognised
- kSMRecognisedTrainingDigit
-
The first pulse dialled digit received on a channel
(or after
sm_reset_channel())
will always be recognised as a training digit. The
actual digit value returned in
param0
will be set to -1.
- kSMRecognisedDigit
- A pulse dialled or DTMF dialled digit has been
recognised and a character representation for it has
been stored in
param0.
In
param1
will be an indication of the digit type
(
kSMPulseDigits or
kSMDTMFDigits) unless a tone detection mode
of type kSMToneLen... was specified in
which case it will contain the duration in milliseconds
of the detected DTMF digit.
- kSMRecognisedTone
- A simple tone has been recognised from the active
set of input tones for the channel. The parameter
param0
and
param1
are assigned values as described above.
- kSMRecognisedCPTone
- A call-progress tone has been recognised and the
corresponding identifier has been stored in
param0.
- kSMRecognisedGruntStart
- The beginning of a grunt has been detected
- kSMRecognisedGruntEnd
- The end of a grunt has been detected,
param0
is set to grunt duration in milliseconds, and
param1
to grunt average energy in negative dBm0 (average is
calculated only over periods during which signal is present).
The maximum value that can be reported as the duration is 4080.
- kSMRecognisedASRResult
-
A spoken word has been recognised with a high degree
of confidence. The most likely user id has been stored
in
param0,
with the next most likely alternative in
param1.
- kSMRecognisedASRUncertain
-
A spoken word has been detected, but its identity is
uncertain. The most likely user id has been stored in
param0,
with the next most likely alternative in
param1.
- kSMRecognisedASRRejected
-
A spoken word may have been detected, but its
identity could not be determined with any confidence. Possible
user ids have been stored in
param0
and
param1.
- kSMRecognisedASRTimeout
-
A one shot ASR recognition job has timed out without
any speech being detected.
- kSMRecognisedCatSig
- A signal has been categorised, the parameter
param0
indicates the algorithm id (see
sm_catsig_listen_for())
and
param1
is a value indicating the signal category with respect
to this algorithm (eg. live speaker or answer
machine).
- kSMRecognisedOverrun
- The recognition FIFO has been overrun because it has
not been polled frequently enough through calls to
sm_get_recognised().
- kSMRecognisedANS
-
An ANS or ANSam tone has been detected (see
sm_ans_listen_for()).
The parameter
param0
will describe the tone detected: 0 for end of tone, 1 for an ordinary
ANS tone, or 2 for the modulated ANSam tone.
- param0 (Only in Prosody version 1)
- A recognition parameter result. See the
param0
field of
sm_get_recognised().
- param1 (Only in Prosody version 1)
- A recognition parameter result. See the
param1
field of
sm_get_recognised().
Returns
0
if call completed successfully, otherwise a standard error such as:
- ERR_SM_DEVERR - device error
- ERR_SM_NO_SUCH_CHANNEL - if channel was invalid or no longer allocated, or call invoked in any channel mode when no speech processing firmware hosted channels allocated
This function is part of the Prosody speech processing API.