RecordMessageActivity.AudioEncoding 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 the codec to use for recording.
Namespace: Microsoft.SpeechServer.Dialog
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)
Syntax
'Declaration
<DefaultValueAttribute(Codec.Pcm)> _
<GlobalizedDescriptionAttribute("RecordingCommon_AudioEncoding")> _
<GlobalizedCategoryAttribute("SpeechCategory")> _
Public Property AudioEncoding As Codec
[DefaultValueAttribute(Codec.Pcm)]
[GlobalizedDescriptionAttribute("RecordingCommon_AudioEncoding")]
[GlobalizedCategoryAttribute("SpeechCategory")]
public Codec AudioEncoding { get; set; }
Property Value
The Codec to use for recording.
Example
The following example creates an instance of the RecordMessageActivity class and sets a number of its properties. In the highlighted line of code, AudioEncoding is set to Pcm8kHz16bit.
this.recordMessage = new Microsoft.SpeechServer.Dialog.RecordMessageActivity();
this.recordMessage.AudioEncoding = Microsoft.SpeechServer.Codec.Pcm8kHz16bit;
this.recordMessage.CanBargeIn = true;
this.recordMessage.EndSilenceTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.recordMessage.InitialSilenceTimeout = System.TimeSpan.Parse("00:00:01.5000000");
this.recordMessage.Name = "recordMessage";
this.recordMessage.PlayBeep = true;
this.recordMessage.SilenceTrimmedLength = System.TimeSpan.Parse("00:00:00.5000000");
this.recordMessage.TerminationDigits = Microsoft.SpeechServer.RecordTerminationDigits.None;
this.recordMessage.UseDefaultGrammars = true;
this.recordMessage.RecordTurnStarting += new System.EventHandler<Microsoft.SpeechServer.Dialog.TurnStartingEventArgs>(this.recordMessage_RecordTurnStarting);
this.recordMessage.ActionTurnStarting += new System.EventHandler<Microsoft.SpeechServer.Dialog.TurnStartingEventArgs>(this.recordMessage_ActionTurnStarting);
this.Activities.Add(this.recordMessage);
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
RecordMessageActivity Class
RecordMessageActivity Members
Microsoft.SpeechServer.Dialog Namespace
RecordMessageActivity.AudioEncodingProperty Field