Share via


Understand Dialog Events

Use workflow activities in the Microsoft Lync Server 2010 environment to handle dialog events such as silence or no recognition. During the execution of a workflow, a user might be stuck at a particular question, and his or her response might not be understood by the system. Application authors can handle this situation by defining a bailout strategy using the communication workflow activities listed in the following table.

Activity

Description

ConsecutiveNoInputsInstantMessagingEventActivity

Executes when a user fails consecutive times to provide IM input. The no input event can execute as a result of silence, or no recognition.

ConsecutiveNoInputsSpeechEventActivity

Executes when a user fails consecutive times to provide speech or dual-tone multiple-frequency (DTMF) input. The no input event can execute as a result of silence, or no recognition.

ConsecutiveNoRecognitionsInstantMessagingEventActivity

Executes when a user's IM responses to a question are not recognized by the system after consecutive attempts.

ConsecutiveNoRecognitionsSpeechEventActivity

Executes when a user's speech or DTMF responses to a question are not recognized by the system after consecutive attempts.

ConsecutiveSilencesInstantMessagingEventActivity

Executes when a user fails consecutive times to provide an IM response to a question.

ConsecutiveSilencesSpeechEventActivity

Executes when a user fails consecutive times to provide a speech or DTMF response to a question.

Silence and No Recognition with InstantMessagingQuestionAnswerActivity

Users respond with text input to prompts (questions) from an InstantMessagingQuestionAnswerActivity activity. The user's text response is compared to the contents of the activity's grammar collection, and the result is either recognition or no recognition. This result is very similar to what happens with speech and DTMF responses to the SpeechQuestionAnswerActivity activity. InstantMessagingQuestionAnswerActivity requires text responses. Spoken and DTMF responses are not recognized by InstantMessagingQuestionAnswerActivity.

When no characters are typed following an InstantMessagingQuestionAnswerActivity prompt within the period of time defined in the InitialSilenceTimeout property, it is treated as a silence.

Consecutive No Inputs

A no input event executes after a specified number of no responses or no recognitions.

  • For speech calls, use the ConsecutiveNoInputsSpeechEventActivity activity.

  • For IM calls, use the ConsecutiveNoInputsInstantMessagingEventActivity activity.

The error condition described in the following table occurs when user input includes silence or no recognition. In this scenario where garbled text follows silence, the no input event acknowledges silence and no recognition and both are counted as no input.

To specify the number of times to prompt the user before the no input event executes, set the MaximumNoInputs property on the event activity:

  • ConsecutiveNoInputsSpeechEventActivity.MaximumNoInputs

  • ConsecutiveNoInputsInstantMessagingEventActivity.MaximumNoInputs

For example, if MaximumNoInputs is set to 3, the user has three chances to respond. Each silence or no recognition counts as a no input response. After the third prompt, a silence or no recognition causes control to pass to the ConsecutiveNoInputsSpeechEventActivity or the ConsecutiveNoInputsInstantMessagingEventActivity activity.

The following scenario shows a sequence where ConsecutiveNoInputsInstantMessagingEventActivity executes after an InstantMessagingQuestionAnswerActivity with MaximumNoInputs set to 2 receives responses of garbled text and silence.

Step

Description

First prompt

What color do you want?

User response

Silence

Second prompt

What color do you want?

User response

Garbled text (no recognition)

Workflow event

ConsecutiveNoInputsInstantMessagingEventActivity executes

For information about adding speech event activities to a workflow, see Walkthrough: Add Events to a Workflow.

Consecutive No Recognitions

A no recognition event occurs as a result of a specified number of failures to recognize the user input.

  • For speech calls, use the ConsecutiveNoRecognitionsSpeechEventActivity activity.

  • For IM calls, use the ConsecutiveNoRecognitionsInstantMessagingEventActivity activity.

To specify the number of times to prompt the user before the no recognition event occurs, set the MaximumNoRecognitions property on the event activity:

  • ConsecutiveNoRecognitionsInstantMessagingEventActivity.MaximumNoRecognitions

  • ConsecutiveNoRecognitionsSpeechEventActivity.MaximumNoRecognitions

For example, if MaximumNoRecognitions is set to 3, the SpeechQuestionAnswer activity speaks the prompt and waits for a response three times. Each prompt/response cycle counts as one. Then, if there are three failed recognitions, the workflow waits and instead of speaking the fourth prompt, ConsecutiveNoRecognitionsSpeechEventActivity executes. Failed recognitions are counted, silence responses are not counted.

The following scenario shows a sequence where ConsecutiveNoRecognitionsSpeechEventActivity occurs after a SpeechQuestionAnswerActivity with MaximumNoRecognitions set to 2 receives responses of garbled text.

Step

Description

First prompt

What color do you want?

User response

"uhhhh...." (first no recognition)

Second prompt

What color do you want?

User response

"ohhhh..."(second no recognition)

Workflow event

ConsecutiveNoRecognitionsSpeechEventActivity occurs

For information about adding speech event activities to a workflow, see Walkthrough: Add Events to a Workflow.

Consecutive Silences

A silence event occurs as a result of a specified number of silences following requests for user input.

  • For speech calls, use the ConsecutiveSilencesSpeechEventActivity activity.

  • For IM calls, use the ConsecutiveSilencesInstantMessagingEventActivity activity.

To specify the number of times to prompt the user before the consecutive silences event occurs, set the MaximumSilences property on the following dialog events.

  • ConsecutiveSilencesSpeechEventActivity.MaximumSilences

  • ConsecutiveSilencesInstantMessagingEventActivity.MaximumSilences

For example, if MaximumSilences is set to 3, the InstantMessagingQuestionAnswer activity types the prompt and waits for a response three times. Each prompt/response cycle counts as one. If the number of consecutive silences reaches four, instead of typing the next prompt, ConsecutiveSilencesInstantMessagingEventActivity occurs. Failed recognitions are not counted. Silence responses are counted.

The following scenario shows a sequence where the ConsecutiveSilencesSpeechEventActivity activity occurs after an InstantMessagingQuestionAnswer activity with MaximumSilences set to 2 receives responses of garbled text and silence.

Step

Description

First prompt

What color do you want?

User response

Silence

Second prompt

What color do you want?

User response

"uhhhh...."

Third prompt

What color do you want?

User response

Silence

Fourth prompt

What color do you want?

User response

Silence

Workflow event

ConsecutiveSilencesSpeechEventActivity occurs

For information about adding speech event activities to a workflow, see Walkthrough: Add Events to a Workflow.

See Also

Concepts

HandleRecognitionErrors (Communications Workflow Sample)

Other Resources

Unified Communications Managed API 3.0 Workflow SDK Documentation