Windows 10 - System.Speech.Synthesis cannot get Mobile version of voice

偶尔善良 提交于 2019-12-23 02:33:00

问题


In my Windows 10's Language, I have installed 2 version of English Language:

  • US
  • United Kingdom

Therefore, in [Settings] > [Time & language] > [Speech]

Under the section [Text-to-Speech], I can see the following options:

  • Microsoft David Mobile
  • Microsoft George Mobile
  • Microsoft Susan Mobile
  • Microsoft Hazel Mobile
  • Microsoft Zira Mobile
  • Microsoft Mark Mobile

but, in C# WinForm, by using the following code:

using System.Speech.Synthesis;
SpeechSynthesizer ss = new SpeechSynthesizer();
ss.GetInstalledVoices();

I can only get:

  • Microsoft David Desktop
  • Microsoft Hazel Desktop
  • Microsoft Zira Desktop

I missed Susan, George and Mark.

How can I get Susan, George and Mark voice version in C# WinForm?


回答1:


You can only access the Windows 10 Voices from the Windows.Media.SpeechSynthesis Namespace which belongs to the WinRT Framework. So you cant use them in WPF or WinForms.

see: What are the different between "Windows.Media.SpeechSynthesis" and "System.Speech.Synthesis"?



来源:https://stackoverflow.com/questions/42151093/windows-10-system-speech-synthesis-cannot-get-mobile-version-of-voice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!