UWP speech synthesizer English on a Non-English Windows 10 安装
UWP speech synthesizer English on a Non-English Windows 10 installation
在我的 UWP 应用程序中,我使用 SpeechSynthesizer
生成英文文本到语音。基本上是一款能够大声朗读英文文本的应用程序。该应用程序将在 Visual Studio 2015 年通过 Windows 商店分发,并将最新更新作为开发工具。
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;
非英文系统默认没有英文语音,一般用户不会费心去安装。那么有没有办法强制Windows10安装英文语音呢?或者有什么办法可以把英文语音和app打包在一起吗?
so is there any why to force windows 10 to install english voice? or is there anyway to package english voice with the app?
我相信没有这种方法可以强制windows 10 安装英语语音或将英语语言与您的应用程序一起安装。
我的建议是在阅读文本之前,先检测一下设备安装的语言包,如果没有安装英文包,则弹出一个消息对话框,让用户安装。我们只能让用户选择安装语言或不安装。
另外一个建议是,你可以尝试集成一个不依赖于本地语言包的文本转语音的网络服务,这样可以解决你的问题。
在我的 UWP 应用程序中,我使用 SpeechSynthesizer
生成英文文本到语音。基本上是一款能够大声朗读英文文本的应用程序。该应用程序将在 Visual Studio 2015 年通过 Windows 商店分发,并将最新更新作为开发工具。
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;
非英文系统默认没有英文语音,一般用户不会费心去安装。那么有没有办法强制Windows10安装英文语音呢?或者有什么办法可以把英文语音和app打包在一起吗?
so is there any why to force windows 10 to install english voice? or is there anyway to package english voice with the app?
我相信没有这种方法可以强制windows 10 安装英语语音或将英语语言与您的应用程序一起安装。
我的建议是在阅读文本之前,先检测一下设备安装的语言包,如果没有安装英文包,则弹出一个消息对话框,让用户安装。我们只能让用户选择安装语言或不安装。
另外一个建议是,你可以尝试集成一个不依赖于本地语言包的文本转语音的网络服务,这样可以解决你的问题。