Using text to speech in Windows Phone 8 and 8.1

You can use the Windows.Phone.Speech.Synthesis API to generate synthesized speech, also known as text-to-speech (TTS), in your Windows Phone 8 app. The following example creates an instance of a speech synthesizer and sets its language with the help of a LINQ query. The LINQ query searches through the VoiceInformation objects that describe each of the installed voices to find one whose language property has a value of “en-US”, which indicates the English language as spoken in US. The argument to the SpeechSynthesizerSetVoice(VoiceInformation) method specifies an index for the voices returned by the LINQ query. Find more details in this MSDN article

Note: To use TTS, you must set the ID_CAP_SPEECH_RECOGNITION capability in the app manifest.

If you are developing a Windows Phone 8.1 XAML app then use the following code instead.

Add a media element in your page and set its visibility to Collapsed if you don’t wish to display it.

Note: Add Microphone capability using Package.appmanifest.

Vivek Maskara

I am pursuing BTech in Software Engineering from Delhi Technological University. I develop apps, create websites and blog about my app experiences.

  • Rohit

    how to make the app to set for all resolution when run in simulator please help

  • Santosh Klpkl

    Tq for your posts. There were awesome. I need a small help from you. In my app I added TTS. When the user taps the button it will read and when the user taps again it stops reading text. Here my problem is “How can I know when the TTS is completed. Because after completion it has to change to Play button again.” Please help me….

Read more:
How to create your first Windows Phone app
How to change the App name and Tile name of your Windows phone app
Data binding in Windows Phone app – One way binding