c# - 通过 C# 代码更改 Windows 7 上的默认语音

标签 c# windows-7 voice

我需要通过 C# 代码更改 Windows 7 当前的默认语音(安装了 Microsoft Anna 和额外的德语语音)。

因为我是一个初级程序员,我很难自己找到它。 我有什么想法可以实现吗?提前谢谢大家的回复!

最佳答案

Windows 7 音频 API 包括 SpeechSynthesizer class ,您可以调用例如 SelectVoice method :

Use the GetInstalledVoices method and VoiceInfo class to obtain the names of installed text-to-speech (TTS) voices that you can select. To select a voice, pass the entire contents of the Name property as the argument for the SelectVoice method. The SpeechSynthesizer object selects the first installed voice that contains name in the voice's VoiceInfo.Name property. The SpeechSynthesizer performs a case-sensitive, substring comparison to determine if the voice matches the name.

编辑:我找到了 some sample code让你开始。

关于c# - 通过 C# 代码更改 Windows 7 上的默认语音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13989199/

相关文章:

c# - 将属性反序列化为抽象基引用

java - system32 中的某些文件对于 Java 程序不可见/不可访问

android - 如何在用户说话时捕捉语音输入

c# - NAudio : Read Wav File As Double Array

android - 使用 Google Now 启动带参数的应用程序

c# - 在 .NET 中更改代码中的 UserAgent

c# - 默认情况下委托(delegate)是静态的吗?

visual-studio-2008 - Visual Studio 2008 和 Windows 7 最近的文件

c# - devexpress网格自定义按钮的Javascript问题

c# - 查明应用程序是否需要管理员权限