亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? speech synthesis & speech recognition using sapi 5_1.htm

?? softonline.dll中函數(shù)的使用,請見不同的例程,VB函數(shù)見VB例子,VC函數(shù)見VC例子,VFP函數(shù)見VFP的例子,BCB函數(shù)見BCB例子, Delphi函數(shù)見Delphi例子
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
<!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 &amp; Speech Recognition Using SAPI 5_1.files/Athena.gif" 
width=174> 
<H1>
<P align=center>Speech Synthesis &amp; 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 import unit.</P>
<P>If you wish, you can write late bound Automation that calls <FONT 
face="Courier New, Courier, mono">CreateOleObject</FONT> to instantiate the 
Automation objects. In the case of the <FONT 
face="Courier New, Courier, mono">SpVoice</FONT> interface, you would 
execute:</P>
<TABLE bgColor=white border=1>
  <TBODY>
  <TR>
    <TD><PRE><CODE><FONT color=black size=2>
<B>var</B>
  SpVoice: Variant;
...
SpVoice := CreateOleObject(<I>'SAPI.SpVoice'</I>)
</FONT></CODE></PRE></TD></TR></TBODY></TABLE>
<H2><A name=TTS>Speech Synthesis</A></H2>
<P>At its simplest level, all you need to do to get your program to speak is to 
use a <FONT face="Courier New, Courier, mono">TSpVoice</FONT> Automation object 
and call the <FONT face="Courier New, Courier, mono">Speak</FONT> method. A 
trivial application that does this can be found in the TextToSpeechSimple.dpr 
project in <A 
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.zip">the 
files associated with this article</A>. The code looks like this:</P>
<TABLE bgColor=white border=1>
  <TBODY>
  <TR>
    <TD><PRE><CODE><FONT color=black size=2>
<B>procedure</B> TfrmTextToSpeech.Button1Click(Sender: TObject);
<B>begin</B>
  SpVoice1.Speak(memText.Text, SVSFDefault)
<B>end</B>;
</FONT></CODE></PRE></TD></TR></TBODY></TABLE>
<P>And there you have it: a speaking application. The call to Speak takes a 
number of parameters that we should examine:</P>
<UL>
  <LI>The first is the text to speak, passed as a <FONT 
  face="Courier New, Courier, mono">PChar</FONT>. Because of the second 
  parameter, this call will be synchronous and so will not return until the text 
  has been spoken. 
  <LI>The second parameter represents some flags that indicate how to use the 
  first parameter (you can combine multiple flags with the <FONT 
  face="Courier New, Courier, mono">or</FONT> operator). For example:<BR>
  <UL>
    <LI><FONT face="Courier New, Courier, mono">SVSFDefault</FONT> means the 
    <FONT face="Courier New, Courier, mono">Speak</FONT> method will be 
    synchronous 
    <LI><FONT face="Courier New, Courier, mono">SVSFlagAsync</FONT> makes the 
    <FONT face="Courier New, Courier, mono">Speak</FONT> method asynchronous and 
    so it returns immediately (you can use events to find out when speech 
    terminates, or call the <FONT 
    face="Courier New, Courier, mono">WaitUntilDone</FONT> method, or call <FONT 
    face="Courier New, Courier, mono">SpeakCompleteEvent</FONT> to receive a 
    Win32 event handle, which can be passed to <FONT 
    face="Courier New, Courier, mono">WaitForSingleObject</FONT>).<BR>Note that 
    the <FONT face="Courier New, Courier, mono">Speak</FONT> method returns a 
    stream number. When queuing several asynchronous voice streams, the stream 
    number allows you to identify them; each voice event passes the stream 
    number to which it relates as a parameter. 
    <LI><FONT face="Courier New, Courier, mono">SVSFPurgeBeforeSpeak</FONT> 
    means any text being spoken and any text queued to speak will be immediately 
    cancelled. 
    <LI><FONT face="Courier New, Courier, mono">SVSFNLPSpeakPunc</FONT> means 
    punctuation marks are read out by their names, rather than being used as 
    punctuation (so ? is read out as <I>question mark</I>) 
    <LI><FONT face="Courier New, Courier, mono">SVSFIsFilename</FONT> means the 
    first parameter is a file name containing text to speak. 
    <LI>SVSFIsXML means the text includes XML tags to alter attributes of the 
    spoken text. For example this text controls the pitch, rate, volume, 
    emphasis and pronunciation of the spoken text:<BR>
    <TABLE bgColor=white border=1>
      <TBODY>
      <TR>
        <TD><PRE><CODE><FONT color=black size=2>
&lt;EMPH&gt;Hello&lt;/EMPH&gt;
&lt;PRON SYM="d eh l f y"&gt;Delphi&lt;/PRON&gt; developers!
&lt;VOLUME LEVEL="70"&gt;
I can speak &lt;PITCH MIDDLE="+10"&gt;high&lt;/PITCH&gt; and &lt;PITCH MIDDLE="-10"&gt;low&lt;/PITCH&gt;.
I can speak &lt;RATE SPEED="+10"&gt;very quickly&lt;/RATE&gt; and &lt;RATE SPEED="-10"&gt;very slowly&lt;/RATE&gt;.
I can speak &lt;VOLUME LEVEL="40"&gt;quietly&lt;/VOLUME&gt; and &lt;VOLUME LEVEL="100"&gt;loudly&lt;/VOLUME&gt;.
&lt;/VOLUME&gt;
</FONT></CODE></PRE></TD></TR></TBODY></TABLE></LI></UL></LI></UL>
<P>When the program executes it lets you type in some text in a memo and a 
button renders it into the spoken word.</P>
<P align=center><IMG 
src="Speech Synthesis &amp; Speech Recognition Using SAPI 5_1.files/TextToSpeechSimple.png"></P>
<P>That's the simple example out of the way, but what can we achieve if we dig a 
little deeper and get our hands a little dirtier? The next project, which holds 
the answers to these questions, can be found as TextToSpeech.dpr in <A 
href="http://www.blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.zip">this 
article's files</A>. You can see it running in the screenshot below; notice that 
as the text is spoken, the current sentence is italicised and the current word 
is displayed selected and also the phonemes spoken are written to a memo.</P>
<P align=center><IMG 
src="Speech Synthesis &amp; Speech Recognition Using SAPI 5_1.files/TextToSpeech.png"></P>
<P>The following sections describe the important parts of the code from this 
project.</P>
<H3><A name=EnumVoices>Enumerating Voices</A></H3>
<P>The first thing the program does is to add a list of all the available voices 
to the combobox and set the rate and volume track bar positions. The latter part 
of this is trivial as the voice rate and volume are always within predetermined 
ranges (the volume is in the range 0 to 100 and the rate is in the range -10 to 
10).</P>
<TABLE bgColor=white border=1>
  <TBODY>
  <TR>
    <TD><PRE><CODE><FONT color=black size=2>
<B>procedure</B> TfrmTextToSpeech.FormCreate(Sender: TObject);
<B>var</B>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国精产品一区一区三区mba视频 | 欧美天堂一区二区三区| 欧美人妇做爰xxxⅹ性高电影| 欧美www视频| 亚洲免费av高清| 精品一区二区三区免费观看| 在线欧美小视频| 国产精品美女久久久久久| 久久99久久久久久久久久久| 日本韩国欧美一区| 中文字幕av一区二区三区高| 麻豆精品久久久| 欧美日韩在线直播| 亚洲伦理在线精品| 国产高清无密码一区二区三区| 欧美三级蜜桃2在线观看| 综合久久久久久| 成人自拍视频在线| 久久久99久久| 国产二区国产一区在线观看 | 色综合亚洲欧洲| 日本一区二区三区四区| 久久成人麻豆午夜电影| 欧美一区二区三区在线电影| 亚洲午夜电影在线| 在线观看欧美日本| 亚洲精品v日韩精品| a4yy欧美一区二区三区| 国产蜜臀97一区二区三区| 国产一区免费电影| 久久亚洲综合色一区二区三区| 喷水一区二区三区| 日韩欧美黄色影院| 九九国产精品视频| 国产亚洲一区二区在线观看| 国产中文字幕精品| 国产视频一区在线观看| 国产成人免费视频一区| 国产欧美日韩激情| 99精品视频在线观看免费| 日韩美女久久久| 欧美四级电影在线观看| 亚洲电影第三页| 欧美一区中文字幕| 久久精品噜噜噜成人av农村| 精品国产成人在线影院| 国产成人免费视频一区| 综合av第一页| 欧美乱妇15p| 老司机午夜精品| 久久久精品综合| 9l国产精品久久久久麻豆| 亚洲美女免费视频| 91精品国产综合久久婷婷香蕉| 另类小说一区二区三区| 亚洲国产精品99久久久久久久久| 97精品久久久午夜一区二区三区| 亚洲国产精品精华液网站| 欧美一卡2卡3卡4卡| 国产麻豆一精品一av一免费 | 日本韩国精品在线| 日韩精品欧美成人高清一区二区| 欧美不卡123| 99精品一区二区三区| 日韩精品电影在线观看| 久久久久久久性| 欧美影院一区二区三区| 另类欧美日韩国产在线| 国产精品日韩成人| 日韩欧美国产1| 91视频在线看| 精品一区二区三区久久| 亚洲欧美日韩国产另类专区| 日韩欧美中文字幕精品| 99久精品国产| 国产精品一区一区| 天堂精品中文字幕在线| 国产精品理论片在线观看| 欧美精品乱人伦久久久久久| 国产1区2区3区精品美女| 性欧美大战久久久久久久久| 久久综合色8888| 欧美另类久久久品| 一本大道久久a久久综合| 狠狠色综合日日| 午夜天堂影视香蕉久久| 国产精品久久久久影视| 欧美一区二区网站| 欧美性猛交xxxx乱大交退制版| 国内精品自线一区二区三区视频| 亚洲午夜精品久久久久久久久| 国产精品欧美精品| 久久久久久亚洲综合| 欧美一级午夜免费电影| 欧美日韩另类一区| 91在线丨porny丨国产| 激情综合网最新| 日韩影院精彩在线| 亚洲成人自拍一区| 一区二区在线观看av| 中文字幕成人av| 亚洲国产精品二十页| 久久嫩草精品久久久精品| 欧美一级黄色大片| 8x8x8国产精品| 欧美日韩国产首页| 在线观看三级视频欧美| 色美美综合视频| jlzzjlzz亚洲日本少妇| 成人免费毛片aaaaa**| 国产一区二区三区综合| 国产一区二区剧情av在线| 老汉av免费一区二区三区 | 国产成人av网站| 久久99在线观看| 黑人巨大精品欧美一区| 久久精品999| 韩国精品在线观看| 国产真实乱偷精品视频免| 国产精品综合一区二区三区| 国产伦精品一区二区三区在线观看| 久久精品国产999大香线蕉| 久久疯狂做爰流白浆xx| 国产乱码精品一区二区三区av| 国产成人av资源| 91免费国产在线| 欧美日韩一二区| 日韩一区二区精品| 久久久国产综合精品女国产盗摄| 国产日韩欧美精品一区| 日韩毛片视频在线看| 亚洲男同性恋视频| 亚洲成人www| 国产一区二区三区在线观看免费| 成人av动漫在线| 欧美视频一区在线观看| 日韩欧美国产高清| 国产精品国产三级国产普通话三级| 亚洲免费看黄网站| 青青草国产精品97视觉盛宴 | 国产亚洲va综合人人澡精品| 久久日韩粉嫩一区二区三区| 国产精品二区一区二区aⅴ污介绍| 一区二区在线看| 久久国产尿小便嘘嘘尿| 成人免费高清在线| 欧美色老头old∨ideo| 欧美精品一区二区在线播放| 中文字幕日本乱码精品影院| 亚洲gay无套男同| 国产高清在线精品| 欧美综合天天夜夜久久| 欧美精品一区二区久久婷婷| 亚洲免费在线视频一区 二区| 日本大胆欧美人术艺术动态| 国产91精品久久久久久久网曝门 | 91丨porny丨蝌蚪视频| 欧美一区二区三区男人的天堂| 国产人伦精品一区二区| 亚洲成人激情综合网| 成人精品小蝌蚪| 日韩欧美色综合| 亚洲精品中文字幕乱码三区| 国内外精品视频| 欧美高清视频在线高清观看mv色露露十八 | 久久在线免费观看| 五月综合激情婷婷六月色窝| 成人自拍视频在线| 精品国产第一区二区三区观看体验| 亚洲精品福利视频网站| 粉嫩av一区二区三区粉嫩 | 欧美优质美女网站| 久久精品日韩一区二区三区| 视频在线在亚洲| 91精品91久久久中77777| 国产亚洲成av人在线观看导航| 日本在线观看不卡视频| 日本乱人伦一区| 国产精品女主播av| 国产成人8x视频一区二区| 欧美成人欧美edvon| 亚洲成人资源在线| 欧美三级视频在线观看| 亚洲人精品午夜| 成人黄色777网| 国产精品水嫩水嫩| 国产91精品精华液一区二区三区| 精品久久久久久久久久久久久久久久久| 亚洲大片免费看| 欧美日韩精品高清| 亚洲h在线观看| 91豆麻精品91久久久久久| 国产精品久久久久影院色老大| 福利视频网站一区二区三区| 国产亚洲一区二区三区在线观看| 国产精品亚洲第一区在线暖暖韩国 | 7799精品视频| 亚洲不卡一区二区三区| 精品视频在线免费看| 一区二区三区四区在线免费观看|