首页 > Windows开发 > 详细

C#字符串转语音

时间:2017-06-27 18:19:17      阅读:245      评论:0      收藏:0      [点我收藏+]

添加引用System.Speech程序集(VS2012以后自带直接引用即可);

using System;
using System.Speech.Synthesis;
 
namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
              
             
            SpeechSynthesizer speech1= new SpeechSynthesizer();
            string str = "你好";
            speech1.Speak(str); //语音方法调用
            
        }     
}
}

 

C#字符串转语音

原文:http://www.cnblogs.com/gaoliangv5/p/7086295.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!