最近在做一个工业监控软件,需要用到MS 的TTS进行中文语句的朗读,以便进行工业操作提示。我对这个不熟悉,谁能提供一点源码?100分相送,更多也行。源码比较长的话请发至:[email protected]
解决方案 »
- 请问如何往SQLServer中写入长字符串
- 一个"馒头"引发的"血案"之CSDN-Delphi版 征文活动,优秀者给予200奖励
- RealMessenger企业即时消息系统
- 请问:能不能截获SQL的错误信息?
- 搞了一上午才弄明白dephi中变体record到底是一个什么东西,散分!
- 再问,Sql 中的 Group by 的用法,在线等。
- 请问如何在一个窗体中画出一个动态的正弦曲线?
- quickreport!!!
- 各位给我介绍几几个好点的树型(treeview)控件.
- 三层,DCOM,请分析 if ClientDataSet1.UpdateStatus<>usUnModified then showmessage('有改动');这条语句为什么行不通?说usUnModified
- 怎么制作仿XP菜单?????散分?????
- ://这是过滤数据的图片请问这东西用什么第3方组件来做,好象用EHLIB很难做到这东西
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Spin;type
TFSpeech = class(TForm)
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
SpinEdit1: TSpinEdit;
SpinEdit2: TSpinEdit;
Memo1: TMemo;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
FSpeech: TFSpeech;implementationuses
VTxtAuto_TLB;
{ Project|Import Type Library
[Add]
Windows\Speech\vtxtauto.tlb
}var
vTxt: VTxtAuto_;
{$R *.DFM}procedure TFSpeech.FormCreate(Sender: TObject);
begin
vTxt := CoVTxtAuto_.Create;
vTxt.Register('', 'Speech');
end;procedure TFSpeech.Button1Click(Sender: TObject);
var
W: WideString;
I, N: Integer;
begin
N := Memo1.Lines.Count;
W := '';
for I := 0 to N - 1 do
W := W + Memo1.Lines.Strings[I];
vTxt.Speed := SpinEdit1.Value;
vTxt.Speak(W, SpinEdit2.Value);
end;procedure TFSpeech.Button2Click(Sender: TObject);
begin
vTxt.StopSpeaking;
end;end.
http://microsoft.com/speech/使用起来还是挺容易的,需要提醒你的是,当你导入类型库的时候无论是D5还是D6(D7没试过)自动产生的TLB单元会有一点小错误,是关于SPVoice对象的,你可以检查一下,然后手动改正过来,否则SDK无法正常使用
http://www.cnetseek.com/gb/index.html