C# 如何获取和使用完整安装的文本到语音语言列表?
在Windows10语音合成中发生了一些非常奇怪的事情 首先,即使Windows在metro和classic控制面板中也显示不同的安装语言 Metro应用程序显示5种安装语言,而经典控制面板仅显示3种 我需要使用Microsoft Pavel语言,但我的应用程序根本看不到C# 如何获取和使用完整安装的文本到语音语言列表?,c#,.net,speech-synthesis,C#,.net,Speech Synthesis,在Windows10语音合成中发生了一些非常奇怪的事情 首先,即使Windows在metro和classic控制面板中也显示不同的安装语言 Metro应用程序显示5种安装语言,而经典控制面板仅显示3种 我需要使用Microsoft Pavel语言,但我的应用程序根本看不到 SpeechSynthesizer ss = new SpeechSynthesizer(); var installed_voices = ss.GetInstalledVoices(); for (int i = 0;
SpeechSynthesizer ss = new SpeechSynthesizer();
var installed_voices = ss.GetInstalledVoices();
for (int i = 0; i < installed_voices.Count; i++)
Console.WriteLine(GetVoiceInfoDesc(installed_voices[i].VoiceInfo));
static string GetVoiceInfoDesc(VoiceInfo vi)
{
return vi.AdditionalInfo["Name"] + " (ID = " + vi.AdditionalInfo["Language"] + ", " + vi.AdditionalInfo["Age"] + ", " + vi.AdditionalInfo["Gender"] + ", " + vi.Culture + ")";
}
我仍然听到伊琳娜的声音,那是女性的声音
我测试了帕维尔的声音,它真的安装好了,而且还能说话
我使用.NET4.0C。
知道这里发生了什么吗
问题是,某些语言出于未知原因只能在metro应用程序中使用,无法通过
SAPI
查看
我们可以通过更改注册表来解决此问题
这是我从互联网某处获取的Windows 10 x64 Pavel语音的修复示例:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\MSTTS_V110_ruRU_PavelM]
@="Microsoft Pavel Mobile - Russian (Russia)"
"419"="Microsoft Pavel Mobile - Russian (Russia)"
"CLSID"="{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}"
"LangDataPath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,\
00,70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,\
65,00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,\
00,5c,00,72,00,75,00,2d,00,52,00,55,00,5c,00,4d,00,53,00,54,00,54,00,53,00,\
4c,00,6f,00,63,00,72,00,75,00,52,00,55,00,2e,00,64,00,61,00,74,00,00,00
"VoicePath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,00,\
70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,65,\
00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,00,\
5c,00,72,00,75,00,2d,00,52,00,55,00,5c,00,4d,00,31,00,30,00,34,00,39,00,50,\
00,61,00,76,00,65,00,6c,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\MSTTS_V110_ruRU_PavelM\Attributes]
"Age"="Adult"
"DataVersion"="11.0.2013.1022"
"Gender"="Male"
"Language"="419"
"Name"="Microsoft Pavel Mobile"
"SharedPronunciation"=""
"Vendor"="Microsoft"
"Version"="11.0"
自述文件说“多亏了诺娜·拉夫鲁基纳”。我也遇到了同样的问题,尝试了多种解决方案,但都没有奏效。我的要求是不要在Windows10中找到特定的声音,所以我寻找其他资源并找到了
我已经尝试安装了其中的一些,我的应用程序会将它们识别为已安装,并按预期工作。也许你可以在那里找到一些适合你需要的声音。祝你好运 你有没有用更高的权限尝试过?@Simonare-是的……也许你给出了错误的链接?此版本适用于
Microsoft语音平台-运行时语言(版本11)
@Kosmos如果按下载并向下滚动,您可以看到可供下载的实际语言。例如,MSSpeech_TTS_ru-ru_Elena.msi
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\MSTTS_V110_ruRU_PavelM]
@="Microsoft Pavel Mobile - Russian (Russia)"
"419"="Microsoft Pavel Mobile - Russian (Russia)"
"CLSID"="{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}"
"LangDataPath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,\
00,70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,\
65,00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,\
00,5c,00,72,00,75,00,2d,00,52,00,55,00,5c,00,4d,00,53,00,54,00,54,00,53,00,\
4c,00,6f,00,63,00,72,00,75,00,52,00,55,00,2e,00,64,00,61,00,74,00,00,00
"VoicePath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,00,\
70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,65,\
00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,00,\
5c,00,72,00,75,00,2d,00,52,00,55,00,5c,00,4d,00,31,00,30,00,34,00,39,00,50,\
00,61,00,76,00,65,00,6c,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\MSTTS_V110_ruRU_PavelM\Attributes]
"Age"="Adult"
"DataVersion"="11.0.2013.1022"
"Gender"="Male"
"Language"="419"
"Name"="Microsoft Pavel Mobile"
"SharedPronunciation"=""
"Vendor"="Microsoft"
"Version"="11.0"