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

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

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...