Speech Synthesis Markup Language

If you need to customize the output of SpeechSynthesizer further, you could specify its input the form of a standard XML-based language known as Speech Synthesis Markup Language (SSML). SSML enables you to customize pronunciation, volume, pitch, prosody (rhythm and intonation), and more. It is a W3C Recommendation published at http://w3.org/TR/speech-synthesis.

To use SSML, you simply pass an appropriate SSML string to SpeechSynthesizer’s SynthesizeSsmlToStreamAsync method instead of SynthesizeTextToStreamAsync. Here’s an example of SSML content that demonstrates some of its features:

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"        xml:lang="en-US">   3/4 is ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.