Getting Started with TTS

Like speech recognition, TTS also requires the ID_CAP_SPEECH_RECOGNITION capability. The capability must present in the WMAppManifest.xml file.

The SpeechSynthesizer class is the main class for achieving TTS. The class exists in the Windows.Phone.Speech.Synthesis namespace.

Out of the box, the speech synthesizer is able to speak using a default voice, as shown:

SpeechSynthesizer synthesizer = new SpeechSynthesizer();synthesizer.SpeakTextAsync("Hi from Windows Phone!");

Selecting a Speaking Voice

The SDK’s speech synthesizer is able to speak using a variety of languages, as spoken in a specific country or regions. See Table 23.1 for the list of speech supported country and region codes.

Get Windows® Phone 8 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.