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 ...
随机推荐
- 前缀、中缀、后缀表达式及其相互转化的Java实现
一.中缀表达式转换为前缀.后缀表达式 给个中缀表达式:a+b*c-(d+e) 首先根据运算符的优先级给所有运算单位加括号:((a+(b*c))-(d+e)) 将运算符号移动到对应括号的前面 ...
- ios7自带的晃动效果
ios7自带的晃动效果 by 伍雪颖 - (void)registerEffectForView:(UIView *)aView depth:(CGFloat)depth; { UIInterpola ...
- java实现window phone推送通知
package com.windowphone.text; import java.io.IOException;import java.io.OutputStream;import java.net ...
- mysql优化之索引优化
Posted by Money Talks on 2012/02/23 | 第一篇 序章第二篇 连接优化第三篇 索引优化第四篇 查询优化第五篇 到实战中去 索引优化 索引优化涉及到几个方面,包括了索引 ...
- RHCA442学习笔记-Unit11内存回收
Unit 12 Memory Reclamation 内存回收 学习目标: A. 了解和调整内存回收 ...
- Android SmsManager 发送短信
SmsManager可以在后台发送短信,无需用户操作,开发者就用这个SmsManager功能在后台偷偷给SP发短信,导致用户话费被扣.必须添加android.permission.SEND_SMS权限 ...
- Ubuntu16.04/windows7修改本地hosts文件
1. 从github上下载最新的hosts文件:https://serve.netsh.org/pub/ipv4-hosts/ ubuntu16.04: 第二步:Ctrl+Alt+T 打开ubuntu ...
- ThinkPHP函数详解:A方法
A方法用于在内部实例化控制器,调用格式:A('[项目://][分组/]模块','控制器层名称')最简单的用法: $User = A('User'); 复制代码 表示实例化当前项目的UserAction ...
- ajax跨域访问 java controller 和 cxf(webservice) 配置方式(CORS)
1. controller跨域访问,配置方式 重点在这里: <mvc:cors> <mvc:mapping path="/*" allowed-origins=& ...
- 使用solr搭建你的全文检索
Solr 是一个可供企业使用的.基于 Lucene 的开箱即用的搜索服务器.对Lucene不熟?那么建议先看看下面两篇文档: 实战Lucene,第 1 部分: 初识 Lucene:http://www ...