C#文字阅读

来源:互联网 发布:比特大陆 知乎 编辑:程序博客网 时间:2024/06/05 17:01
  using System.Speech.Synthesis;  //语音类库  using System.Collections.Generic;  //数组集合类库

SpeechSynthesizer spvoice = new SpeechSynthesizer();  //语音类spvoice.Rate = 1;            //使用 spvoice 设置朗读频率 [范围 -10 ~ 10] spvoice.Volume = 80;         //使用 spvoice 设置朗读音量 [范围 0 ~ 100] spvoice.SpeakAsync("大家好!");   //开始读


介绍下这个类库,它叫“System.Speech.dll”。.net FrameWork 的安装目录里就有它的身影!装了.net FrameWork 的童鞋,可以通过以下目录去寻觅它!

大概是这个:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5


0 0
原创粉丝点击