gpt4 book ai didi

c# - 在 SpeechSynthesizer 中更改声音

转载 作者:行者123 更新时间:2023-11-30 17:28:08 26 4
gpt4 key购买 nike

我试图更换扬声器,但我没有在 SpeechSynthesizer 类中征集所有已安装的扬声器(George、Susan、Jakub),另一方面我有一个根本没有安装(齐拉)。

enter image description here enter image description here

这里发生了什么?我能否以某种方式将特定的扬声器添加到我的项目中(例如作为 .dll 或其他东西)而不依赖于计算机语言/区域?

最佳答案


更新

正如@Jimi 提到的,System.Speech 和 Microsoft.Speech 是不同的,为了避免混淆,只使用其中之一应该是正确的选择。

对于 System.Speech

  1. 转到设置/区域和语言/添加语言
  2. 从语言设置中下载Speech

例如 Helen 在 en_US 包中。因此,应通过添加English (United States) 语言来下载额外的 Speech。

对于 Microsoft.Speech

  1. 从下面的链接下载演讲
  2. 添加对 项目中的Microsoft.Speech DLL

Microsoft Speech Recognition 和 Text-to-Speech 引擎数据文件可以从下面的链接下载;

Microsoft 支持的语言的语音识别和文本到语音引擎 https://www.microsoft.com/en-us/download/details.aspx?id=27224

更多信息:
微软语音编程指南
https://learn.microsoft.com/en-us/previous-versions/office/developer/speech-technologies/hh378466(v%3doffice.14)

SpeechSynthesizer.SelectVoice 方法
https://learn.microsoft.com/en-us/previous-versions/office/developer/speech-technologies/dd167624(v%3Doffice.14)

System.Speech.Synthesis 命名空间
https://learn.microsoft.com/en-us/dotnet/api/system.speech.synthesis?view=netframework-4.7.2

关于c# - 在 SpeechSynthesizer 中更改声音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53471385/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com