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 Codeusing 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 ...
随机推荐
- 亿级数据时,内存性能低于IO性能
最近因项目需要,需要生成有0到99999999共1亿的不重复数,于是想着直接将这些数据生成为一个文件就可以了,代码如. private void generate(string savePath) { ...
- tar命令的详解
tar命令 [root@linux ~]# tar [-cxtzjvfpPN] 文件与文件夹 ....參数:-c :建立一个压缩文件的參数指令(create 的意思):-x :解开一个压缩文件的參数指 ...
- (BUG已修改,最优化)安卓ListView异步加载网络图片与缓存软引用图片,线程池,只加载当前屏之说明
原文:http://blog.csdn.net/java_jh/article/details/20068915 迟点出更新的.这个还有BUG.因为软引应不给力了.2.3之后 前几天的原文有一个线程管 ...
- android中利用实现二级联动的效果
按照惯例,首先上一张效果图. 本篇文章实现的效果就是如图中所圈的那样,实现类似于HTML中的二级联动的效果. 对于第一个选项我们读取的是本地xml文件来填充数据的, 对于第二个选项我们读取的是通过中央 ...
- [Angular 2] ROUTING IN ANGULAR 2 REVISITED
Let's say we have a list of contacts, click each contact, we can render a new route to get the detai ...
- php连接oracle
1.安装oracle客户端,不管是32位还是64位:当系统是32位的时候,要装32位的客户端,PL/SQL才能给连上数据库 2.php.ini中对应的oracle相关扩展打开.php_openssl. ...
- vector中的resize与 reserve
void reserve (size_type n); reserver函数用来给vector预分配存储区大小,即capacity的值 ,但是没有给这段内存进行初始化.reserve 的参数n是推荐预 ...
- Qt树形控件QTreeView使用1——节点的添加删除操作 复选框的设置
QtreeView是ui中最常用的控件,Qt中QTreeWidget比QTreeView更简单,但没有QTreeView那么灵活(QTreeWidget封装的和MFC的CTreeCtrl很类似,没有m ...
- 虚拟机windows xp 下安装配置mysql cluster 7.3.2
1.虚拟机环境下安装的 1 192.168.131.21(管理节点,存储节点,sql节点) 2 192.168.131.22(存储节点,sql节点) 2.安装程序 在两台机器上面同时进行 第一步: ...
- Android_常用控件及适配器
TextView 控件中显示的内容必须是文本 TextView中常用的属性 android:text TextView中显示的文本内容 android:textColor 字体颜色 格式为#RGB # ...