asrm_is_help_or_cancel()

Determine whether the current result is either a help request or a cancel request.

Synopsis:

#include "asr/asrm.h"
 
int asrm_is_help_or_cancel(asr_result_t *result, cfg_item_t *opt_help_section, cfg_item_t *opt_cancel_section, asr_result_action_t *ret, int perform)

Arguments:

result

A pointer to the result structure.

opt_help_section

A pointer to the help configuration section.

opt_cancel_section

A pointer to the cancel configuration section.

ret

The action to take.

perform

A flag to indicate whether to take action on the result.

Library:

libasr

Description:

The asrm_is_help_or_cancel() function determines whether the specified result is either a help request or a cancel request. If it is one of these, the function sets ret to the appropriate action code. If the result is a help request and perform is nonzero, the asrp_active_help() function is invoked.

Returns:

1 The result is either a help request or a cancel request. The res parameter is set to either ASR_RECOGNITION_CANCEL or ASR_RECOGNITION_RESTART.

0 The result is neither a help request nor a cancel request.