主要是用COM组件 微软的 Speech SDK ,vs05默认装载里是有这个组件的,但是只可能发英文。
简单应用实例:
1.建一个console App.
2 . 加必要的引用,项目-> 添加引用-> COM 选择 Microsoft Speech Object Library 点确定 退出。
3.
using SpeechLib;
4. 在 Main()下面添加以下代码
当我用Item(1), Item(2), Item(3), Item(4)时,会报HRESULT:0x80045039的异常,是 When enumerating items, the requested index is greater than the count of items.的,可能是没装支持中文发音的原因。