How to Select a Speaking Voice for the Speech Synthesizer in Windows Phone 8?

The Speech Synthesizer in Windows Phone uses the default language that the user has selected in settings -> Speech App in Windows Phone. The Speech API in Windows Phone lets the developers to set the voice or gender of the voice to be used for the Speech Synthesizer. This blog post will explain in simple steps in how to set the speaking Voice for the Speech Synthesizer in Windows Phone.

How to Select a Speaking Voice for the Speech Synthesizer in Windows Phone 8?

The speaking voice from the InstalledVoices needs to identified as the first step and then assign it to the SpeechSynthesizer using its SetVoice method. Below is a simple function that picks the voice based on the language “de-DE” and gender = female and is used for the speech synthesizer.

async public Task SpeechSynthesizerExample()

{

SpeechSynthesizer speech = new SpeechSynthesizer();

VoiceInformation info = (from m in InstalledVoices.All

where m.Language == "de-DE"

&& m.Gender == VoiceGender.Female

select m).FirstOrDefault();

speech.SetVoice(info);

await speech.SpeakTextAsync("Welcome to DeveloperPublish.com");

}

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...