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. 開始Unity3D的学习之旅

    前言:这个系列的文章纯属对自己学习的整理,非高手之作.但确实的记载了我作为一个没接触过3D游戏编程的大学生的心路历程.争取每周整理一次吧.之所以会開始学Unity3D,最基本的原因是由于在快放暑假的时 ...

  2. PHP获取Cookie模拟登录CURL(转)

    要提取google搜索的部分数据,发现google对于软件抓取它的数据屏蔽的厉害,以前伪造下 USER-AGENT 就可以抓数据,但是现在却不行了.利用抓包数据发现,Google 判断了 cookie ...

  3. 普通SQL注入

    安全防御:过滤/转义非法参数,屏蔽SQL查询错误. 工具:Firefox,hackbar,sqlmap,burpsuite 1.联想tms站 例1, 联想tms站fromCity参数存在普通SQL注入 ...

  4. 解锁Dagger2使用姿势(一)

    毫无疑问,Dagger2的 上手是有门槛的,有门槛是因为它里边的概念多,用起来复杂,可是一旦你学会了Dagger2的使用,你一定会爱不释手的.与ButterKnife和AndroidAnnotatio ...

  5. Android5.0之CardView的使用

    CardView也是一个非常炫酷的控件,一般我们将CardView配合RecyclerView来使用,当然,CardView也可以配合ListView来使用,都是可以的.OK,我们先来看一张CardV ...

  6. Nginx高性能服务器安装、配置、运维 (2) —— Nginx安装

    三.Nginx 安装 使用SecureCRT以Root身份登录阿里云,在安装Nginx前先做好阿里云磁盘挂载 -------------- 挂载磁盘 -------------- 1.df -h #显 ...

  7. 在ModelSim波形图中以参数名显示变量

    在ModelSim波形图中以参数名显示变量 在使用Verilog HDL编写有限状态机等逻辑的时候,状态机的各个状态通常以参数表示,但当使用ModelSim仿真的时候,状态机变量在wave窗口中以二进 ...

  8. JS插件-日期

    原文出处 源码下载 原文出处 源码下载

  9. datetimepicker 初始化只显示年

    $("#overdue2").datetimepicker({ format: 'yyyy', autoclose: true, startView:4, minView:4, t ...

  10. sublime text3输入中文的问题.

    1.新建sublime_imfix.c文件 里面输入: /* * sublime-imfix.c * Use LD_PRELOAD to interpose some function to fix ...