语音02_Delphi
网址 :http://www.exceletel.com/support/whtpapers/speech/delphi.htm
Installing the Microsoft SAPI speech SDK in Delphi
After you install the SAPI 5.1 SDK available from Microsoft by clicking HERE, you will find that it gives you most of the important methods, events, types and constants through a registered type library. This means that you can access SAPI 5.1 functionality through late bound or early bound Automation.
|
From the Delphi menu select "Project | Import Type Library" and select "Microsoft Speech Object Library (Version 5.1) from the list of type libraries. Check the "Generate Component Wrapper" checkbox. This will give you component wrapper classes for the Automation objects listed in the file. Create a new page called "SAPI 5.1" so that the created components will go on their own Component Palette. Click on the Install button to automatically import the library and place the components on your SAPI 5.1 palette. You will now have a file called SpeechLib_TLB.pas that you can reference to see all the classes and definitions which will be of help when you need to see how to convert types or see how a function is implemented. You can create a new package for the resulting new components or use the default, "Borland User Components". |
![]() |
![]() |
Here is the Install dialog showing the default. You can click on the "into new package" tab and insert your own filename if you like. |
|
Next click on the "Component | Install Packages" menu item and you will see the dialog box to the right. Find your package, in this case the default where we added the SAPI 5.1 components to the Borland User Components Package. Make sure your package is checked and press the "OK" button. |
![]() |
When you are done, you will see 19 new components on your SAPI 5.1 palette page! Each of these components makes it easy to drop on your forms and access the interface associate with it. You will see the TSpVoice component which we use in the sample programs to do the speaking with SpVoice events, methods and properties. There are also the SpMMAudioOut component that lets us link a speech stream to a windows audio output device and SpAudioFormat which lets us control wave formats. They don't seem to come with unique icons, which makes it hard to tell them apart from each other without getting hover help or memorizing their position in the list, but it sure is nice to have them componentized.
If you look in the Delphi 5, 6 and 7 folders under SAPI 5.1 you will find the component packages for each of these versions. NOTE: Delphi 6 had a bug that causes it to not to be able to import the type library properly, so you will have to create it in another version of Delphi and copy it in yourself.
Back to speech page...
X
语音02_Delphi的更多相关文章
- 关于几个主流语音SDK的接入问题
这两周都在忙着游戏上线还有接入游戏语音,两周分别接了腾讯语音和百度语音!!! 关于腾讯语音的一些问题 由于发现腾讯语音的在录完音频后的数据是编过码的所以出现了一些问题: *不能解码(腾讯方不提供解码算 ...
- 一百元的智能家居——Asp.Net Mvc Api+讯飞语音+Android+Arduino
大半夜的,先说些废话提提神 如今智能家居已经不再停留在概念阶段,高大上的科技公司都已经推出了自己的部分或全套的智能家居解决方案,不过就目前的现状而言,大多还停留在展厅阶段,还没有广泛的推广起来,有人说 ...
- 客服小妹是如何泡到手的——C#定时提醒·语音录制·语音播放·文件转录Demo源码——倾情奉献!
一.需求提出 客服小妹跟我说,每天要统计新加好友数,得先记下昨天的数目,然后查看今天的数目,还要相减,打字,记录——好麻烦! 又说,客户多的时候,忙起这头忘了那头,文字记录备忘又太费劲! 我说,赐你一 ...
- C#语音朗读文本 — TTS的实现
TTS, Text To Speech的缩写,是使用语音朗读文本的技术.目前,在国内应用较多的是排队叫号系统 Windows 平台的TTS,通常使用的是微软自带的 Speech API. Window ...
- C#开发微信门户及应用(19)-微信企业号的消息发送(文本、图片、文件、语音、视频、图文消息等)
我们知道,企业号主要是面向企业需求而生的,因此内部消息的交流显得非常重要,而且发送.回复消息数量应该很可观,对于大企业尤其如此,因此可以结合企业号实现内部消息的交流.企业号具有关注安全.消息无限制等特 ...
- 网页mp3语音展示,点击图片放大,点击图片跳转链接,调表格
查看mp3语音 <td class="value"><embed src="${sounds.soundName}" type="a ...
- 将语音搜索集成到Google Now中
原文标题:Use Voice Search to integrate with Google Now 原文链接:http://antonioleiva.com/voice_search_google_ ...
- iOS 语音朗读
//判断版本大于7.0 if ([[[UIDevice currentDevice] systemVersion] integerValue] >= 7.0) { NSStr ...
- 在iPhone上同时关闭语音控制和siri的方法
分享 步骤及要点:1.在设置里打开siri.语音控制就自动关闭了.2.在siri里的"仅语言拨号"语言项里选择"土耳其文"或者"阿拉伯文". ...
随机推荐
- 20160924-1——mysql存储引擎
一.主要存储引擎 5.5以后的版本,默认存储引擎从myisam改成了innodb:线上推荐都用innodb 二.innodb存储引擎 (一)结构 INNODB存储引擎大致分三部分,图中已经(1)(2) ...
- 取得当前页面的value值问题
取得当前输入input的值 <body> <form action=""> <input type="text" ...
- 【python】-- Django路由系统(网址关系映射)、视图、模板
Django路由系统(网址关系映射).视图.模板 一.路由系统(网址关系映射) 1.单一路由对应: 一个url对应一个视图函数(类) urls.py: url(r'^test', views.test ...
- java基础—Hashtable,HashMap,TreeMap的差别
Hashtable : 此类实现一个哈希表,该哈希表将键映射到对应的值.不论什么非null 对象都能够作键值,是线程不同步的 HashMap : 基于哈希表的Map接口的实现.此实现提供全部可选的映 ...
- spring 编译时抱错纪录class path resource [spring/] cannot be resolved to URL because it does not exist
class path resource [spring/] cannot be resolved to URL because it does not exist; 在 pom.xml 里添加如下代码 ...
- 《Python 数据分析》笔记——数据的检索、加工与存储
数据的检索.加工与存储 1.利用Numpy和pandas对CSV文件进行写操作 对CSV文件进行写操作,numpy的savetxt()函数是与loadtxt()相对应的一个函数,他能以诸如CSV之类的 ...
- Java基础—运算符(转载)
转载自:Java运算符 计算机的最基本用途之一就是执行数学运算,作为一门计算机语言,Java也提供了一套丰富的运算符来操纵变量.我们可以把运算符分成以下几组: 算术运算符 关系运算符 位运算符 逻辑运 ...
- 20170405-STO库存转储单
1.工厂间转储: (1)MB1B 移动类型 301 工厂到工厂(一步)转账,->简单明了一步转储过账后会产生 GR,MITA增加了,MIZH减少了,MB03, **会产生 GR,如果俩工厂 标准 ...
- WCF 远程服务器返回了意外响应: (400) Bad Request。
WCF 端 <system.web> <httpRuntime maxRequestLength="2147483647" /> </system. ...
- Python之异常处理(Day27)
一.错误和异常 part1: 1.语法错误(这种错误,根本过不了python解释器的语法检测,必须在程序执行前就改正) #语法错误示范一 if #语法错误示范二 def test: pass #语法错 ...


