SAPI 对象和接口

来源:互联网 发布:担保企业软件 编辑:程序博客网 时间:2024/05/22 08:17

There are two main objects of interest to a TTS Enginedeveloper: the SpVoice object (SAPI) and the TTS Engine object (refer to figure2).  The third object in the figureis a UI component which an engine may or may not implement. 

对于TTS引擎开发人员来说, 有2个重要的对象去关心:SpVoice和TTS Engine。第三个就是引擎是否实现的UI组件。

 

 

 

The SpVoice object implements two interfaces which we willbe concerned with - ISpVoice, which is the interface which the applicationuses to access TTS functionality, and ISpTTSEngineSite, which the engine uses towrite audio data and queue events.  TheTTS Engine must implement two interfaces as well - ISpTTSEngine, which is theinterface through which SAPI will call the engine, and ISpObjectWithToken, whichis the interface through which SAPI will create and initialize the engine. The UI object, if it exists, must implement ISpTokenUI, through which itwill be accessed by the SAPI control panel (or, potentially, otherapplications). 

SpVoice对象实现了2个我们可能使用的接口: ISpVoice是应用程序访问TTS功能的接口; ISpTTSEngineSite是TTS引擎用来写音频数据和队列时间。TTS引擎则实现了必须的2个接口:ISpTTSEngine是通过SAPI调用引擎的接口; ISpObjectWithToken是通过SAPI创建和初始化引擎的接口。如果UI对象存在的话, 必须实现ISpTokenUI接口,SAPI控制面板(或者其他应用程序)通过这个接口来访问UI对象。