Udostępnij za pośrednictwem


StatementActivity.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 StatementActivity selects the prompt to play.

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

Syntax

'Declaration
<GlobalizedDescriptionAttribute("StatementActivity_TurnStarting")> _
<GlobalizedCategoryAttribute("SpeechEventsCategory")> _
Public Event TurnStarting As EventHandler(Of TurnStartingEventArgs)
[GlobalizedDescriptionAttribute("StatementActivity_TurnStarting")] 
[GlobalizedCategoryAttribute("SpeechEventsCategory")] 
public event EventHandler<TurnStartingEventArgs> TurnStarting

Example

The following example creates a StatementActivity and sets a number of its properties. The highlighted line of code identifies greetings_TurnStarting as the handler for the TurnStarting event.

this.greetings = new Microsoft.SpeechServer.Dialog.StatementActivity();
this.userKnown = new System.Workflow.Activities.IfElseBranchActivity();
this.greetings.CanBargeIn = true;
this.greetings.LogResults = true;
this.greetings.Name = "greetings";
this.greetings.TurnStarting += new System.EventHandler<Microsoft.SpeechServer.Dialog.TurnStartingEventArgs>(this.greetings_TurnStarting);
this.userKnown.Activities.Add(this.greetings);

Remarks

The activity selects the prompt to play (such as main, silence, escalated silence) before raising this event. This selection is based on the dialog history. The selection is available from the PromptType property on TurnStartingEventArgs.

Application developers can change the prompt by attaching an event handler to this event and providing the prompt in the event arguments.

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

StatementActivity Class
StatementActivity Members
Microsoft.SpeechServer.Dialog Namespace
PromptType
TurnStartingEventArgs