Share via


RecordAudioActivity.MainPrompt 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 the main prompt.

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

Syntax

'Declaration
<GlobalizedDescriptionAttribute("RecordAudioActivity_MainPrompt")> _
<BrowsableAttribute(False)> _
<GlobalizedCategoryAttribute("SpeechCategory")> _
Public ReadOnly Property MainPrompt As PromptBuilder
[GlobalizedDescriptionAttribute("RecordAudioActivity_MainPrompt")] 
[BrowsableAttribute(false)] 
[GlobalizedCategoryAttribute("SpeechCategory")] 
public PromptBuilder MainPrompt { get; }

Property Value

The main prompt.

Example

The following code example shows the creation of a RecordAudioActivity instance, recordAudio. After recordAudio is created, a number of its properties are set. The highlighted line of code shows the MainPrompt property being initialized with a prompt resource.

this.recordAudio = new Microsoft.SpeechServer.Dialog.RecordAudioActivity("RecordAudio");
this.recordAudio.AudioEncoding = Microsoft.SpeechServer.Codec.Pcm8kHz16bit;
this.recordAudio.CanBargeIn = false;
this.recordAudio.EndSilenceTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.recordAudio.InitialSilenceTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.recordAudio.LeadingSilenceTrimmedLength = System.TimeSpan.Parse("00:00:00.5000000");
this.recordAudio.PlayBeep = true;
this.recordAudio.TerminationDigits = Microsoft.SpeechServer.RecordTerminationDigits.None;
this.recordAudio.TrailingSilenceTrimmedLength = System.TimeSpan.Parse("00:00:00.5000000");
recordAudio.MainPrompt.SetText(GetPromptResource("recordAudio_MainPrompt"));
this.Activities.Add(this.recordAudio);

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

RecordAudioActivity Class
RecordAudioActivity Members
Microsoft.SpeechServer.Dialog Namespace