C# System.Speech.Synthesis如何将语音从en US更改为en GB?

C# System.Speech.Synthesis如何将语音从en US更改为en GB?,c#,.net,visual-studio,text-to-speech,speech-synthesis,C#,.net,Visual Studio,Text To Speech,Speech Synthesis,我在网上到处找过。我发现了如何改变声音的性别(合成器。选择VoiceByHits(VoiceGender.Male)和声音的年龄,但我不知道如何改变声音的文化(即添加英国口音) 另一个可行的选择是找到另一个语音合成器。然而,当我试图在我的程序中实现它时,语音合成器将无法工作 非常感谢您的帮助!两周前,我开发了法语和英语语音合成器工具。我按照以下步骤安装了更多语音,并通过调用SelectVoiceByHits方法配置了不同的语音 Tools: Windows 7, Visual Studio 20

我在网上到处找过。我发现了如何改变声音的性别(合成器。选择VoiceByHits(VoiceGender.Male)和声音的年龄,但我不知道如何改变声音的文化(即添加英国口音)

另一个可行的选择是找到另一个语音合成器。然而,当我试图在我的程序中实现它时,语音合成器将无法工作


非常感谢您的帮助!

两周前,我开发了法语和英语语音合成器工具。我按照以下步骤安装了更多语音,并通过调用SelectVoiceByHits方法配置了不同的语音

Tools: Windows 7, Visual Studio 2013
您可以按如下方式设置区域性信息

SpeechSynthesizer _synthesizer = new SpeechSynthesizer();
_synthesizer.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult, 0, CultureInfo.GetCultureInfo("fr-FR")); // For French
// en-US for English(US)
安装更多语音的步骤

WARNING: This involves manual edits to your registry. Do at your own risk.

Step 1 --------------------------------------------------------------------------
Install the Speech Platform v11
a) go here: http://www.microsoft.com/en-us/download/details.aspx?id=27225
b) click "Download"
c) select the "x64_SpeechPlatformRuntime\SpeechPlatformRuntime.msi"
d) run the installer (duh :P)

Step 2: --------------------------------------------------------------------------
Get the alternate voices
a) go here: http://www.microsoft.com/en-us/download/details.aspx?id=27224
b) click "Download"
c) select the voice files you want. They are the ones that have "TTS" in the file name. 
    MSSpeech_TTS_en-CA_Heather
    MSSpeech_TTS_en-GB_Hazel
    MSSpeech_TTS_en-IN_Heera
    MSSpeech_TTS_en-US_Helen
    MSSpeech_TTS_en-US_ZiraPro
    MSSpeech_TTS_en-AU_Hayley
d) run the installers for each (duh :P)

Step 3: --------------------------------------------------------------------------
Extract the registry tokens
a) Open Regedit
b) Under - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech Server\v11.0\Voices - right click the "Tokens" folder and export. Save this file to your desktop as voices1.reg so it will be easy to find later.
c) Under - HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices - right click "Tokens" and again export it, again to the desktop. Call it voices2.reg.

Step 4: --------------------------------------------------------------------------
Edit the voices1/2 files
a) open Voices1.reg in Notepad.
b) press "cntrl + H"
c) enter \Speech Server\v11.0\ into the "Find What" field
d) enter \Speech\ into the "Replace With" field
e) click "Replace All"
f) Save File
g) Repeat a-f with the Voices2.reg file

Step 5: --------------------------------------------------------------------------
Merge the new Registry files into your registry
a) double click to "run" both Voices1.reg and Voices2.reg
b) Click "Yes" when it prompts
您现在应该可以在Voice Attack和Windows TTS选项菜单中访问新语音。此过程也可以与其他语音包一起使用

资料来源:


希望这能提供一些想法。

两周前,我开发了法语和英语语音合成器工具。我按照以下步骤安装了更多语音,并通过调用SelectVoiceByHits方法配置了不同的语音

Tools: Windows 7, Visual Studio 2013
您可以按如下方式设置区域性信息

SpeechSynthesizer _synthesizer = new SpeechSynthesizer();
_synthesizer.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Adult, 0, CultureInfo.GetCultureInfo("fr-FR")); // For French
// en-US for English(US)
安装更多语音的步骤

WARNING: This involves manual edits to your registry. Do at your own risk.

Step 1 --------------------------------------------------------------------------
Install the Speech Platform v11
a) go here: http://www.microsoft.com/en-us/download/details.aspx?id=27225
b) click "Download"
c) select the "x64_SpeechPlatformRuntime\SpeechPlatformRuntime.msi"
d) run the installer (duh :P)

Step 2: --------------------------------------------------------------------------
Get the alternate voices
a) go here: http://www.microsoft.com/en-us/download/details.aspx?id=27224
b) click "Download"
c) select the voice files you want. They are the ones that have "TTS" in the file name. 
    MSSpeech_TTS_en-CA_Heather
    MSSpeech_TTS_en-GB_Hazel
    MSSpeech_TTS_en-IN_Heera
    MSSpeech_TTS_en-US_Helen
    MSSpeech_TTS_en-US_ZiraPro
    MSSpeech_TTS_en-AU_Hayley
d) run the installers for each (duh :P)

Step 3: --------------------------------------------------------------------------
Extract the registry tokens
a) Open Regedit
b) Under - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech Server\v11.0\Voices - right click the "Tokens" folder and export. Save this file to your desktop as voices1.reg so it will be easy to find later.
c) Under - HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices - right click "Tokens" and again export it, again to the desktop. Call it voices2.reg.

Step 4: --------------------------------------------------------------------------
Edit the voices1/2 files
a) open Voices1.reg in Notepad.
b) press "cntrl + H"
c) enter \Speech Server\v11.0\ into the "Find What" field
d) enter \Speech\ into the "Replace With" field
e) click "Replace All"
f) Save File
g) Repeat a-f with the Voices2.reg file

Step 5: --------------------------------------------------------------------------
Merge the new Registry files into your registry
a) double click to "run" both Voices1.reg and Voices2.reg
b) Click "Yes" when it prompts
您现在应该可以在Voice Attack和Windows TTS选项菜单中访问新语音。此过程也可以与其他语音包一起使用

资料来源:


希望这能提供一些想法。

在查看了
SpeechSynthesizer
的文档后,我发现了一个类型为
VoiceInfo
的属性。在
VoiceInfo
中,有一个名为
Culture
的属性。我想您应该设置该属性

大概是这样的:

var culture = new CultureInfo("en-gb");
var voice = new VoiceInfo();
voice.Culture = culture;
yourSpeechSynthesizer.voice = voice;

在查看了
SpeechSynthesizer
的文档后,我发现了一个类型为
VoiceInfo
的属性。在
VoiceInfo
中,有另一个名为
Culture
的属性。我想您应该设置该属性

大概是这样的:

var culture = new CultureInfo("en-gb");
var voice = new VoiceInfo();
voice.Culture = culture;
yourSpeechSynthesizer.voice = voice;