C#文字阅读

  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


你可能感兴趣的:(C#)