Search code examples
visual-studio-2015uwptext-to-speech

UWP speech synthesizer English on a Non-English Windows 10 installation


In my UWP app I'm using SpeechSynthesizer to generate English text-to-speech. Basically an app with the capability to read English text aloud. The app will be distributed through Windows store with Visual Studio 2015 with latest update as development tool.

var synth = new SpeechSynthesizer();
var voices = SpeechSynthesizer.AllVoices;
var english = from v in voices where v.Language.Contains("en") && v.Gender == VoiceGender.Female select v;
VoiceInformation voice = english.First() as VoiceInformation;
synth.Voice = voice;

A voice with English capability is not present on non-English system by default, and most users won't bother to install it. So is there any way to force Windows 10 to install English voice? Or is there any way to package English voice with the app?


Solution

  • so is there any why to force windows 10 to install english voice? or is there anyway to package english voice with the app?

    I believe there is no such method to force windows 10 to install English voice or package English language with your app.

    My suggestion is that before read text, detect the installed language packages of the device, if English package is not installed, pop up a message dialog to tell user to install it. We can only let user to choose to install the language or not.

    Another suggestion is that you may try to integrate a web service for text-to-speech which do not depend on the local language package, this could be way to solve your issue.