Computer Talker with C# z
Using the Code
- Add a textbox named '
txtWords
' to a form. - Add a button named '
btnSpeak
' to a form. - Add a reference to
System.Speech
. - 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();
}
}
} - Run. Text entered into the textbox will be spoken by the computer.
Computer Talker with C# z的更多相关文章
- Windows2008当桌面使用
因为需要32位系统,又想用8G内存. 一.提高开机速度 0 |" t7 A- d! `- A- R5 | 1.免除登录时按Ctrl+Alt+Del的限制 打开<开始> - & ...
- 20175226 2018-2019-2 《Java程序设计》第四周学习总结
20175226 2018-2019-2 <Java程序设计>第四周学习总结 教材学习内容总结 子类与父类 格式class 子类名 extends 父类名 Object类是所有类的祖先类 ...
- 【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 ...
- hdu 3695:Computer Virus on Planet Pandora(AC自动机,入门题)
Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 256000/1280 ...
- Computer Graphics Research Software
Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Last update ...
- ACM: Gym 100935F A Poet Computer - 字典树
Gym 100935F A Poet Computer Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d &am ...
- HDU 3695 Computer Virus on Planet Pandora(AC自动机模版题)
Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 256000/1280 ...
- hdu ----3695 Computer Virus on Planet Pandora (ac自动机)
Computer Virus on Planet Pandora Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 256000/1280 ...
- 【转载】shell编程——if语句 if -z -n -f -eq -ne -lt
shell编程中条件表达式的使用 if 条件then Commandelse Commandfi 别忘了这个结尾 If语句忘了结尾fites ...
随机推荐
- Palindrome(poj3974)(manacher算法)
http://poj.org/problem?id=3974 Palindrome Time Limit: 15000MSMemory Limit: 65536K Total Submissions: ...
- SpringMVC经典系列-13使用SpringMVC处理Ajax请求---【LinusZhu】
注意:此文章是个人原创,希望有转载须要的朋友们标明文章出处,假设各位朋友们认为写的还好,就给个赞哈,你的鼓舞是我创作的最大动力,LinusZhu在此表示十分感谢,当然文章中如有纰漏,请联系linusz ...
- Delphi调用java开发的WebService,传入参数出错
http://www.cnblogs.com/zhangzhifeng/p/3397053.html 调用没有参数的服务正常,当调用有参数的服务出现以下错误java.util.concurrent.E ...
- CenOS搭建FTP服务器
CenOS搭建FTP服务器 -------------------------------------------------------------------------准备工作--------- ...
- [Erlang]怎样加入自己的BIF
步骤 1. 执行configure 2. 将你的bifs加入至erts/emulator/beam/bif.tab bif re:grep/2 bif re:compile/1 3. 创建一个C代码文 ...
- Python之美[从菜鸟到高手]--Python垃圾回收机制及gc模块详解
http://blog.csdn.net/yueguanghaidao/article/details/11274737
- 使用DrawerLayout实现QQ5.0侧拉菜单效果
在上一篇文章中,我们介绍了怎么使用DrawerLayout来实现一个简单的侧拉菜单(使用DrawerLayout实现侧拉菜单),也就是我们常说的抽屉效果,GitHub上类似效果的实现方式非常多,实现出 ...
- UPDATE sql 优化
一个网友说他的存储过程中有一段update sql,运行了15分钟还没出结果,需要优化一下 他把sql发给我 UPDATE TB_RESULT R SET R.VOTE_COUNT=NVL(( SEL ...
- css :after和:before
:before是css中的一种伪元素,可用于在某个元素之前插入某些内容.:after是css中的一种伪元素,可用于在某个元素之后插入某些内容. 举例: 1.结合border写个对话框的样式. < ...
- iOS之应用内跳转系统设置相关界面
在iOS开发中,有时会有跳转系统设置界面的需求,例如提示用户打开蓝牙或者WIFI,提醒用户打开推送或者位置权限等.在iOS6之后,第三方应用需要跳转系统设置界面,需要在URL type中添加一个pre ...