SayAs.Format Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the value of the format attribute for a say-as element in the SSML markup language of a prompt.

Namespace:   System.Speech.Synthesis.TtsEngine
Assembly:  System.Speech (in System.Speech.dll)

public string Format { get; set; }

Property Value

Type: System.String

The FragmentState.SayAs property gets or sets the value for the Format property in a SayAs instance.

For example, a prompt may contain the phrase “The time is <say-as interpret-as=”time”> 05:00 </say-as>”. In this example, 05:00 could be spoken as ”five o’clock” or “five AM” or “oh five hundred”. The Format property allows the value of the interpret-as attribute to be extended to specify which time format to speak. If the value for the interpret-as attribute is “time:24hour”, the SpeechSynthesizer speaks “oh five hundred”. If the value for the interpret-as attribute is “time:12hour”, the SpeechSynthesizer speaks “five A M”.

.NET Framework
Available since 3.0
Return to top
Show: