MenuActivity.TurnStarting Event
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.
Occurs after the MenuActivity selects the prompt to play and when the get phase turn starts.
Namespace: Microsoft.SpeechServer.Dialog
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)
Syntax
'Declaration
<DesignerButtonAttribute(5, "Designer_BindDataSource", "BindDataSource")> _
<GlobalizedDescriptionAttribute("DialogActivityCommon_TurnStarting")> _
<GlobalizedCategoryAttribute("SpeechEventsCategory")> _
Public Event TurnStarting As EventHandler(Of TurnStartingEventArgs)
[DesignerButtonAttribute(5, "Designer_BindDataSource", "BindDataSource")]
[GlobalizedDescriptionAttribute("DialogActivityCommon_TurnStarting")]
[GlobalizedCategoryAttribute("SpeechEventsCategory")]
public event EventHandler<TurnStartingEventArgs> TurnStarting
Example
The following example creates a MenuActivity instance named chooseSize, sets a number of properties on the instance, and registers an event handler for the TurnStarting event. The highlighted line of code identifies chooseSize_TurnStarting as the handler for this event.
this.chooseSize = new Microsoft.SpeechServer.Dialog.MenuActivity();
this.chooseSize.CanBargeIn = true;
this.chooseSize.ConfirmationThreshold = 1F;
this.chooseSize.DataField = "";
this.chooseSize.DataMember = "";
this.chooseSize.DataSource = null;
this.chooseSize.CompleteTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.chooseSize.InitialSilenceTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.chooseSize.Name = "chooseSize";
this.chooseSize.SynonymsField = "";
this.chooseSize.UseDefaultGrammars = true;
this.chooseSize.ConfirmationTurnStarting += new System.EventHandler<Microsoft.SpeechServer.Dialog.TurnStartingEventArgs>(this.chooseSize_ConfirmationTurnStarting);
this.chooseSize.TurnStarting += new System.EventHandler<Microsoft.SpeechServer.Dialog.TurnStartingEventArgs>(this.chooseSize_TurnStarting);
this.Activities.Add(this.chooseSize);
Remarks
The activity selects the prompt to play (such as main, silence, and escalated silence) before raising this event. This selection is based on the dialog history. The selection is available from the PromptType property on TurnStartingEventArgs.
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
MenuActivity Class
MenuActivity Members
Microsoft.SpeechServer.Dialog Namespace
PromptType
TurnStartingEventArgs