Using the Code

  1. Add a textbox named 'txtWords' to a form.
  2. Add a button named 'btnSpeak' to a form.
  3. Add a reference to System.Speech.
  4. In the form's code-behind, add:
    Collapse | Copy Code
    using System.Windows.Forms;
    using System.Speech.Synthesis; namespace Sample
    {
    public partial Class Form1: Form
    {
    public SpeechSynthesizer _synthesizer;
    private void btnSpeak_Click(object sender, EventArgs e)
    {
    _synthesizer = new SpeechSynthesizer();
    var words = txtWords.Text;
    _synthesizer.Speak(Words);
    }
    public Form1()
    {
    InitializeComponent();
    }
    }
    }
  5. Run. Text entered into the textbox will be spoken by the computer.

Computer Talker with C# z的更多相关文章

  1. Windows2008当桌面使用

    因为需要32位系统,又想用8G内存. 一.提高开机速度   0 |" t7 A- d! `- A- R5 | 1.免除登录时按Ctrl+Alt+Del的限制 打开<开始> - & ...

  2. 20175226 2018-2019-2 《Java程序设计》第四周学习总结

    20175226 2018-2019-2 <Java程序设计>第四周学习总结 教材学习内容总结 子类与父类 格式class 子类名 extends 父类名 Object类是所有类的祖先类 ...

  3. 【Python】使用torrentParser1.03对多文件torrent的分析结果

    Your environment has been set up for using Node.js 8.5.0 (x64) and npm. C:\Users\horn1>cd C:\User ...

  4. hdu 3695:Computer Virus on Planet Pandora(AC自动机,入门题)

    Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 256000/1280 ...

  5. Computer Graphics Research Software

    Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Last update ...

  6. ACM: Gym 100935F A Poet Computer - 字典树

    Gym 100935F A Poet Computer Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d &am ...

  7. HDU 3695 Computer Virus on Planet Pandora(AC自动机模版题)

    Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 256000/1280 ...

  8. hdu ----3695 Computer Virus on Planet Pandora (ac自动机)

    Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others)    Memory Limit: 256000/1280 ...

  9. 【转载】shell编程——if语句 if -z -n -f -eq -ne -lt

    shell编程中条件表达式的使用 if  条件then Commandelse Commandfi                              别忘了这个结尾 If语句忘了结尾fites ...

随机推荐

  1. Ubuntu Server 12.04 静态IP简洁配置

    PS:很长时间没使用Ubuntu了,刚才安装个Ubuntu Server 12.04做测试.Ubuntu的网络设置跟Redhat系是不一样的,配置IP时发现跟以前的Ubuntu桌面版本也有所不同,记录 ...

  2. mvn命令安装jar包--转

    有的jar通过pom配置文件不能下载,比如oracle的jdbc连接jar就是,这个时候需要通过mvn的安装命令进行手动安装jar.命令是: mvn install:install-file -Dfi ...

  3. 闲话shuffle(洗牌)算法

    工作中经常会用到洗牌算法,看到这篇文章不错,原文摘自:http://www.atatech.org/article/detail/11821/928  作者:子仲   场景 洗牌算法的应用场景其实很多 ...

  4. [Form Builder]Oracle Form系统变量中文版总结大全

    转:http://yedward.net/?id=57 Form中的系统变量,它存在于一个Form的整个运行时期的会话之中,变量包含了有关Form相关属性的字节信息.有些变量标明了当前状态,还有些变量 ...

  5. 安卓项目-利用Sqlite数据库,开发新闻发布系统

    本教程致力于程序员可以快速的学习安卓移动端手机开发. 适合于已经习得一种编程语言的同仁. 更多志同道合,想要学习更多编程技术的大神们. 小弟不才,麻烦关注一下我的今日头条号-做全栈攻城狮. 本文章是基 ...

  6. 初见Javascript

    1.HTML 中的脚本必须位于 <script> 与 </script> 标签之间. 脚本可被放置在 HTML 页面的 <body> 和 <head> ...

  7. sublime text 3快捷键设置

    sublime text 3  v-3103默认快捷键设置 [ { "keys": ["ctrl+shift+n"], "command": ...

  8. Double跟double

    Double 是类 double是基础数据类型.Double类型是double的包装类,在JDK1.5以后,二者可以直接相互赋值,称为自动拆箱和自动装箱.看你的提示,我推测你的jdk版本在1.5以前. ...

  9. web开发学习之旅---html第一天

    一.认识浏览器 浏览器就是接收浏览着的操作,然后帮浏览者去web服务器请求网页内容(html格式返回),然后展现成人眼能够看得懂的可视化页面的软件. IE==浏览器?IE是浏览器的一种,还有Firef ...

  10. hdoj1874 (优先队列+Dijkstra)

    hdoj1874 分析: 一看题目, 就是求最短路, 这道题用的是Dijkstra+优先队列.先说一下Dijkstra算法:每次扩展一个距离最短的节点, 更新与其相邻点的距离. 当所有边权都为正时, ...