<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0066)http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm -->
<HTML><HEAD><TITLE>Speech Synthesis & Speech Recognition Using SAPI 5.1</TITLE>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR></HEAD>
<BODY bgColor=lightblue><A name=Top></A><FONT
face="Verdana, Arial, Helvetica, sans-serif" size=2><IMG align=right alt=Athena
height=164
src="Speech Synthesis & Speech Recognition Using SAPI 5_1.files/Athena.gif"
width=174>
<H1>
<P align=center>Speech Synthesis & Speech Recognition Using SAPI
5.1</P></H1>
<P align=center><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#AboutBrian"><I>Brian
Long</I></A> (<A href="http://www.blong.com/"
target=_blank>http://www.blong.com/</A>)</P>
<H2>Table of Contents</H2>
<UL>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#Introduction">Introduction</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#TTS">Speech
Synthesis</A>
<UL>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#EnumVoices">Enumerating
Voices</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#Speech">Making
Your Computer Talk</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#Events">Voice
Events</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#Animation">Animating
Speech</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#KeepingTrack">Keeping
Track Of Spoken Text</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#SpeakingDialogs">Speaking
Dialogs</A> </LI></UL>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#SR">Speech
Recognition</A>
<UL>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#Grammars">Grammars</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#DSR">Continuous
Dictation Recognition</A>
<UL>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#GramNotify">Grammar
Notifications</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#EngineDialogs">Engine
Dialogs</A> </LI></UL>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#CnC">Command
and Control Recognition</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#Troubleshooting">Speech
Recognition Troubleshooting</A> </LI></UL>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#Deployment">SAPI
5.1 Deployment</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#Summary">Summary</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#References">References/Further
Reading</A>
<LI><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm#AboutBrian">About
Brian Long</A> </LI></UL>
<P><A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.zip">Click
here</A> to download the files associated with this article.</P>
<HR>
<H2><A name=Introduction>Introduction</A></H2>
<P>This article looks at adding support for speech capabilities to Microsoft
Windows applications written in Delphi, using the Microsoft Speech API version
5.1 (SAPI 5.1). For an overview on the subject of speech technology please <A
href="http://www.blong.com/Conferences/DCon2002/Speech/Speech.htm">click
here</A>.</P>
<P>There is also coverage on using SAPI 4 to build speech-enabled applications.
Information on using the SAPI 4 high level interfaces can be found by <A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI4HighLevel/SAPI4.htm">clicking
here</A>, whilst discussion of the low level interfaces can be found by <A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI4LowLevel/SAPI4.htm">clicking
here</A>.</P>
<P>SAPI 5.1 exposes most of the important interfaces, types and constants
through a registered type library (SAPI 5.0 did not do this, making it difficult
to use in Delphi without someone writing the equivalent of the JEDI import unit
for SAPI 5). This means that you can access SAPI 5.1 functionality through late
bound or early bound Automation. We will focus our attention on early bound
Automation, which requires you to import the type library.</P>
<P>Choose <FONT face="Courier New, Courier, mono">Project | Import Type
Library...</FONT> and locate the type library described as <I>Microsoft Speech
Object Library (Version 5.1)</I> in the list. Now ensure the <FONT
face="Courier New, Courier, mono">Generate Component Wrapper</FONT> checkbox is
checked so the type library import unit will include component wrapper classes
for each exposed Automation object. These components will go on the
<I>ActiveX</I> page of the Component Palette by default, but you may wish to
specify a more appropriate page, such as <I>SAPI 5.1</I>.</P>
<P>Now press <FONT face="Courier New, Courier, mono">Install...</FONT> so the
type library will be imported and the generated components will be installed
onto the Component Palette (pressing <FONT
face="Courier New, Courier, mono">Create Unit</FONT> would also generate the
type library import unit, but would require us to install it manually).</P>
<P>The generated import unit is called SpeechLib_TLB.pas and will be installed
in a package. You can either select the default package offered (the <I>Borland
User Components</I> package by default), choose to open a different package or
even create a new one. When the package is compiled and installed you will get a
whopping set of 19 new components on the <I>SAPI 5.1</I> page of the Component
Palette.</P>
<P>Each component is named after the primary interface it implements. So for
example, the <FONT face="Courier New, Courier, mono">TSpVoice</FONT> component
implements the <FONT face="Courier New, Courier, mono">SpVoice</FONT> interface.
You can find abundant documentation on all these interfaces in the SAPI 5.1 SDK
documentation.</P>
<P>Ready made SAPI 5.1 packages containing Automation components for Delphi 5, 6
and 7 can be found in appropriately named subdirectories under SAPI 5.1 in the
accompanying files.</P>
<P><B><U>Note:</U></B> if you are using Delphi 6 you will encounter a problem
that is still present even with Update Pack 2 installed. The type library
importer has a bug where the parameters to Automation events are incorrectly
dispatched (they are sent in reverse order) meaning that all the Automation
events operate incorrectly (if at all). You can avoid this by importing the type
library in Delphi 5 or 7 and using the generated type library import unit in
Delphi 6. A Delphi 6 compatible package is supplied with <A
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.zip">this
article's files</A> (it uses a Delphi 5 generated type library import unit).</P>
<P><B><U>Note:</U></B> The Delphi 7 type library importer has been improved to
produce more accurate Pascal representations of items in the type library than
Delphi 5 did (and than Delphi 6 tried to). As a result of this, the event
handlers will often have different parameter lists in the Delphi 7 imported type
library. This means that the sample programs won't compile with Delphi 7 with
the true Delphi 7 SAPI type library i
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
sapi5_1.rar (9个子文件)
SAPI 5_1
Speech Synthesis & Speech Recognition Using SAPI 5_1.htm 60KB
Speech Synthesis & Speech Recognition Using SAPI 5_1.files
TextToSpeech.png 23KB
TextToSpeechSimple.png 4KB
TextToSpeechAnimated.png 26KB
SAPI5CPL.png 9KB
Athena.gif 13KB
TextToSpeechAnimatedReal.png 33KB
CommandAndControl.png 9KB
SAPI51.zip 190KB
共 9 条
- 1
资源评论
- ttyyzh2012-08-22英文版,看的比较累
- li3753835892014-09-26安装了 可以用! 实用的东西..
- hhzzlove2012-07-02英文版的,磕磕碰碰的看完,感觉还可以。
- gooodboooy2013-12-05还不错,看过了,能用
- advcfan2014-09-24哥们 资源相当不错啊
普通网友
- 粉丝: 882
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功