通过.NET使用Windows讲述人

问题描述 投票:4回答:2

是否可以在.NET应用程序中使用Windows Narrator的文本语音转换功能?我想使用它或类似的服务从我的C#应用​​程序中读出很大的字符串。这可能吗?

c# .net windows narrator
2个回答
8
投票

女士有一个speech API,现在有一个易于使用的托管接口。


0
投票

使用Visual Studio时;在解决方案资源管理器中。

  1. 右键单击'参考',然后单击''。
  2. 在“
  3. [[Framework
  4. ”下搜索“ System.Speech”,然后勾选它。单击'
  5. OK
  6. '
然后使用以下代码:

System.Speech.Synthesis.SpeechSynthesizer mainSpeechSynthesizer = new System.Speech.Synthesis.SpeechSynthesizer(); mainSpeechSynthesizer.Speak("Test, test. Test! TEST.");

以下是如何将System.Speech.Synthesis与示例结合使用的详细信息:

Initialize and Manage the Speech Synthesizer

© www.soinside.com 2019 - 2024. All rights reserved.