使用百度语音接口,实现文字转化成语音播放 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=U…
一.项目中一直用到了文字转语音的功能,需求也比较简单,就是将一段报警信息通过语音的方式播放出来,之前一直采用CS客户端,利用微软自带的Speech语音播放库就可以完成, 1.1 封装winSpedk类代码如下: namespace Speak { using System; using System.Runtime.CompilerServices; using System.Speech.Synthesis; using System.Threading; using SpeechLib; p…
跟着微软走妥妥的,C#文字转语音有很多参数我就不说了,毕竟我也是初学者.跟大家分享最简单的方法,要好的效果得自己琢磨喽: 先添加引用System.Speech程序集: using System; using System.Speech.Synthesis; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { SpeechSynthesizer hello = new SpeechSyn…