Share via


GetAndConfirmActivity Class

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Gets and confirms a single item of information.

Namespace: Microsoft.SpeechServer.Dialog
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)

Syntax

<DesignerSerializerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.GenericSpeechCodeDomSerializer, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType(CodeDomSerializer))> _
<GlobalizedDescriptionAttribute("GetAndConfirmActivity")> _
<ActivityValidatorAttribute(GetType(GetAndConfirmActivityValidator))> _
<DesignerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechExpandableDesigner, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType(IDesigner))> _
<ToolboxBitmapAttribute(GetType(GetAndConfirmActivity))> _
<GlobalizedCategoryAttribute("MSSCategory")> _
<DesignerSerializerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechActivityMarkupSerializer, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType(WorkflowMarkupSerializer))> _
Public NotInheritable Class GetAndConfirmActivity
    Inherits SpeechCompositeActivity
    Implements IFormFillingElement, IActivityEventListener(Of ActivityExecutionStatusChangedEventArgs)

[DesignerSerializerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.GenericSpeechCodeDomSerializer, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(CodeDomSerializer))] 
[GlobalizedDescriptionAttribute("GetAndConfirmActivity")] 
[ActivityValidatorAttribute(typeof(GetAndConfirmActivityValidator))] 
[DesignerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechExpandableDesigner, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(IDesigner))] 
[ToolboxBitmapAttribute(typeof(GetAndConfirmActivity))] 
[GlobalizedCategoryAttribute("MSSCategory")] 
[DesignerSerializerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechActivityMarkupSerializer, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(WorkflowMarkupSerializer))] 
public sealed class GetAndConfirmActivity : SpeechCompositeActivity, IFormFillingElement, IActivityEventListener<ActivityExecutionStatusChangedEventArgs>

Remarks

A GetAndConfirmActivity operates in two phases: the first phase (the get phase) obtains the user's response and the second phase (the confirmation phase) confirms that the user's utterance matches the semantic item. Each phase has its own private QuestionAnswerActivity.

Default confirmation grammars, which are generated automatically, are able to recognize yes and no, and can perform dynamic correction based on the results from the get-phase recognition.

For an example of dynamic correction, suppose that the semantic value obtained in the get phase is "red," which generates a confirmation prompt of "Did you say red?" A user response of "No, blue" causes a denial of the semantic value "red" and resets the semantic value to "blue." If the confidence in this utterance is less than or equal to the value in ConfirmationThreshold, the confirmation phase restarts. If the confidence in this utterance is greater than the value in ConfirmationThreshold, GetAndConfirmActivity exits with GetAndConfirm.RecognitionResult reflecting the new semantic value.

There are default grammars for GetAndConfirmActivity for each language that ships with Speech Server. For information about the default grammar for a particular language, click the appropriate link:

Note

The default confirmation grammars do not appear in the ConfirmationGrammars collection.

Inheritance Hierarchy

System.Object
???? System.Workflow.ComponentModel.DependencyObject
???????? System.Workflow.ComponentModel.Activity
???????????? System.Workflow.ComponentModel.CompositeActivity
???????????????? Microsoft.SpeechServer.Dialog.SpeechCompositeActivity
????????????????????Microsoft.SpeechServer.Dialog.GetAndConfirmActivity

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Windows Server 2003

See Also

Reference

GetAndConfirmActivity Members
Microsoft.SpeechServer.Dialog Namespace