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

推荐订阅源

T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
S
SegmentFault 最新的问题
Schneier on Security
Schneier on Security
W
WeLiveSecurity
Webroot Blog
Webroot Blog
T
Threatpost
量子位
大猫的无限游戏
大猫的无限游戏
C
Cisco Blogs
腾讯CDC
N
News | PayPal Newsroom
T
Troy Hunt's Blog
T
Tailwind CSS Blog
Latest news
Latest news
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The Register - Security
The Register - Security
Know Your Adversary
Know Your Adversary
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Engineering at Meta
Engineering at Meta
SecWiki News
SecWiki News
MyScale Blog
MyScale Blog
GbyAI
GbyAI
Application and Cybersecurity Blog
Application and Cybersecurity Blog
A
Arctic Wolf
The GitHub Blog
The GitHub Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
有赞技术团队
有赞技术团队
NISL@THU
NISL@THU
L
LINUX DO - 最新话题
雷峰网
雷峰网
P
Privacy International News Feed
Spread Privacy
Spread Privacy
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
月光博客
月光博客
V
V2EX
H
Help Net Security
博客园 - 三生石上(FineUI控件)
U
Unit 42
B
Blog
PCI Perspectives
PCI Perspectives
G
GRAHAM CLULEY
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
Last Week in AI
Last Week in AI

博客园 - leon qian

正则表达式全部符号解释 android显示大图片的一些技巧 SAPI 5.1 语音合成的列举语音引擎 Unicode符号代码表 c#中的问号 C#的四则运算函数 - leon qian - 博客园 读取Excel文件时出现null的解决方法 - leon qian - 博客园 让CSS区别不同浏览器 在Repeater中使用按钮或其他控件的解决方法 - leon qian - 博客园 在IIS中使用Gzip压缩后传送数据 一堆常用JS代码 stream转string,string转stream 一个XML转换的例子 JS代码整理 asp.net 真正意义上的裁减图片 由于启动用户实例的进程时出错的解决方法 C#中的正则表达式 转 SqlHelper详解(转载) [转].net用url重写URLReWriter实现任意二级域名
SAPI 5.1 语音合成的事件
leon qian · 2009-08-21 · via 博客园 - leon qian

翻译说明:这篇译原文五个部分Making Your Computer TalkVoice EventsAnimating SpeechKeeping Track Of Spoken TextSpeaking Dialogs
只是说翻译范围覆盖这五个部分的范围,其中有一些例子不重写了,因为我暂时用不上,有一些乱七八糟的话不译,怕出错,毕竟对其理解不是很深,只挑一些重要的进行复述Making Your Computer Talk 部分
提及了如何让朗读暂停和进行,只提取其中用到的几个函数,基本上原型一些出来就知道怎么回事,不详细翻译了

SpVoiceClass
  public virtual void Pause(); //暂停函数

public virtual void Resume();//恢复函数
public virtual int Skip(string Type, int NumItems);//跳过朗读函数

基本一看名称就知道了,只对Skip的参数做一个说明,Type参数代表要跳过的Item的类型[如 sentence 按句子跳过...],但注意这个参数目前只能是"Sentence",后面的NumItems 是指要跳过多少个句子

Voice Events  事件部分
事件的使用和正常的使用没什么大的区别,唯一需要注意的是

SpVoiceClass
public virtual SpeechVoiceEvents EventInterests getset; }

这个属性,运行原理如下:
朗读开始后,类会检测EventInterests属性里所有事件,并触发事件,没有包括在内的事件不会触发
SpeechVoiceEvents枚举变量如下

Enum SpeechVoiceEvents
    SVEStartInputStream 
= 2
    SVEEndInputStream 
= 4
    SVEVoiceChange 
= 8
    SVEBookmark 
= 16
    SVEWordBoundary 
= 32
    SVEPhoneme 
= 64
    SVESentenceBoundary 
= 128
    SVEViseme 
= 256
    SVEAudioLevel 
= 512
    SVEPrivate 
= 32768
    SVEAllEvents 
= 33790
End Enum

多个枚举变量用或运算符连接,变量代表的事件具体说明见SAPI的帮助

Animating Speech  动画语音

OnViseme 事件由每个"可识别位置"引发["可识别位置"指朗读一段时发音嘴型需要明显改变的位置],英语朗读里一共有22个"可识别位置"[根据迪斯尼定义的13个可识别位置(早期动画用13个图片代表嘴唇动作)]
可以用相应的嘴形图片形成简单的发音动画
[具体例子不重做了,需要的请见原文]Keeping Track Of Spoken Text 跟踪朗读文字
[原文通过事件 OnWord & OnSentence 简单实现了高亮显示正在阅读的文字]
[简单不翻译了...懒...]
Speaking Dialogs  朗读对话框
[原文穷举了一个Form的Label 和 Button 属性,朗读出所有的Text,简单不翻译]

到此,原文

Speech Synthesis 语音合成部分结束
译后,才发现没译出什么,主要是比较简单,原文实现了一些例子,将其中重要的TIPs提取出来,主要是实现并不难,对本人没有参考价值

本文转自Tachikoma
http://www.cnblogs.com/Tachikoma/