Share via


QuestionAnswerActivity.CanBargeIn Property

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 or sets whether this prompt can be interrupted when the user speaks.

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

Syntax

'Declaration
<DefaultValueAttribute(True)> _
<GlobalizedDescriptionAttribute("DialogActivityCommon_CanBargeIn")> _
<GlobalizedCategoryAttribute("SpeechCategory")> _
Public Property CanBargeIn As Boolean
[DefaultValueAttribute(true)] 
[GlobalizedDescriptionAttribute("DialogActivityCommon_CanBargeIn")] 
[GlobalizedCategoryAttribute("SpeechCategory")] 
public bool CanBargeIn { get; set; }

Property Value

True if the user can interrupt the prompt, causing recognition to start immediately; False if the prompt must complete before recognition begins. The default value is True.

Example

The following code example shows the creation of a QuestionAnswerActivity instance, askDrink. After askDrink is created, a number of its properties are set. In the highlighted line of code, CanBargeIn is set to True.

this.askDrink = new Microsoft.SpeechServer.Dialog.QuestionAnswerActivity();
this.askDrink.CanBargeIn = true;
this.askDrink.CompleteTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.askDrink.InitialSilenceTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.askDrink.Name = "AskDrink";
this.askDrink.TurnStarting += new System.EventHandler<Microsoft.SpeechServer.Dialog.TurnStartingEventArgs>(this.askDrink_TurnStarting);
askDrink.Prompts.HelpPrompt.AppendText(GetPromptResource("askDrink_HelpPrompt"));
askDrink.MainPrompt.AppendText(GetPromptResource("askDrink_MainPrompt"));
askDrink.Grammars.Add(new Microsoft.SpeechServer.Recognition.Grammar(new System.Uri("Grammars\\Drinks.grxml", System.UriKind.RelativeOrAbsolute), "Drinks"));
askDrink.DtmfGrammars.Add(new Microsoft.SpeechServer.Recognition.Grammar(new System.Uri("Grammars\\DigitsDTMF.grxml", System.UriKind.RelativeOrAbsolute), "digit"));
this.Activities.Add(this.askDrink);

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

QuestionAnswerActivity Class
QuestionAnswerActivity Members
Microsoft.SpeechServer.Dialog Namespace
QuestionAnswerActivity.CanBargeInProperty Field