惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
GbyAI
GbyAI
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
量子位
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
CERT Recently Published Vulnerability Notes
Recent Announcements
Recent Announcements
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
P
Privacy International News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 叶小钗
L
Lohrmann on Cybersecurity
G
GRAHAM CLULEY
T
The Exploit Database - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
P
Proofpoint News Feed
NISL@THU
NISL@THU
博客园 - Franky
C
Cybersecurity and Infrastructure Security Agency CISA
The Register - Security
The Register - Security
M
MIT News - Artificial intelligence
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
F
Full Disclosure
T
Threat Research - Cisco Blogs
P
Privacy & Cybersecurity Law Blog
The Hacker News
The Hacker News
博客园 - 【当耐特】
D
Docker
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Jina AI
Jina AI
Help Net Security
Help Net Security
V
Visual Studio Blog
小众软件
小众软件
B
Blog
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
Forbes - Security
Forbes - Security
N
Netflix TechBlog - Medium
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic

博客园 - 挑战

从存储过程中读取相关信息 Blend Step by Step书籍笔记(第一章) WPF非轮询方式实时更新数据库变化SqlDependency 动态解析XAML文本构建WPF的UI 解决为'*********' 的游标已存在问题 数据表死锁查询和处理 SQL Server操作XML(六)XML FLOWR SQL Server操作XML(五)XML Query-XQuery SQL Server操作XML(四)XML数据类型 SQL Server操作XML(三)OPENXML函数功能 SQL Server操作XML(二)XML子句实例 SQL Server操作XML(一)XML子句 数据绑定 最为详尽的WPF类继承关系 LinQ数据访问 WPF Diagram Designer Part 3:连接Item 照猫画虎WPF之二数据绑定 照猫画虎WPF之一:命名空间 解决WPF部署后客户端访问安全性问题
C#读取文本播放相应语音
挑战 · 2012-02-27 · via 博客园 - 挑战

利用微软text to speech引擎(TTS),读取文本

(1)添加Microsoft Speech Object Library的项目引用

(2)引入using SpeechLib名称控件

(3)读取文本

        SpeechVoiceSpeakFlags flag = SpeechVoiceSpeakFlags.SVSFlagsAsync;
        SpVoice voice = new SpVoice();

        //默认使用“控制面板”—>“声音”—>“录制”选项卡的“配置”—>“文本到语音转换”—>语言选择中对应项,例如Microsoft Lily或Microsoft Sam

        //此处可采用“预听语音”测试,保证操作系统本身正确配置该语音包,尤其是B/S结构往往会被忽略

        //否则会抛出异常:“没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))”

        voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(0);
        voice.Speak(textBox1.Text, flag);

(4)语言包的选择(亲测)

WindowsXP 中默认只安装了Microsoft Sam,而且只能朗读英文,不能读中文,直接略过。(不推荐)

找了一个Microsoft_TTS_51_chs.msi安装了以后多了一个Microsoft Simplified Chinese语音包,但只能读中文,不能读英文单词,将单词拆解为字母读出(全中文可以)

Windows Vista/7中默认安装Microsoft Lili,可以中英文混读,但语音效果较好(推荐),但是XP系统无法安装,Microsoft Anna 只能读英文(不推荐)。

ScanSoft-MeiLing-ChineseMandarinVoice可以在XP下安装,但是多音字识别不好,优点是比较小巧,40M左右。

NeoSpeech Lily,声音的效果比 Microsoft Lili要好。推荐使用,但是比较大500M左右。