There are two main objects of interest to a TTS Engine
developer: the SpVoice object (SAPI) and the TTS Engine object (refer to figure
2).
The third object in the figure
is 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 will
be concerned with -
ISpVoice
, which is the interface which the application
uses to access TTS functionality, and
ISpTTSEngineSite
, which the engine uses to
write audio data and queue events.
The
TTS Engine must implement two interfaces as well -
ISpTTSEngine
, which is the
interface through which SAPI will call the engine, and
ISpObjectWithToken
, which
is the interface through which SAPI will create and initialize the engine.
The UI object, if it exists, must implement
ISpTokenUI
, through which it
will be accessed by the SAPI control panel (or, potentially, other
applications).
SpVoice對象實現了2個我們可能使用的介面: ISpVoice是應用程式訪問TTS功能的介面; ISpTTSEngineSite是TTS引擎用來寫音頻資料和隊列時間。TTS引擎則實現了必須的2個介面:ISpTTSEngine是通過SAPI調用引擎的介面; ISpObjectWithToken是通過SAPI建立和初始化引擎的介面。如果UI對象存在的話, 必須實現ISpTokenUI介面,SAPI控制台(或者其他應用程式)通過這個介面來訪問UI對象。