码迷,mamicode.com
首页 > Windows程序 > 详细

C#字符串转语音

时间:2017-06-27 18:46:44      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:logs   code   ace   oid   []   console   语音   引用   names   

添加引用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#字符串转语音

标签:logs   code   ace   oid   []   console   语音   引用   names   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!