blob: 75c87642a68541685b02f18a5b1f8ecb3cff743c [file] [log] [blame]
/**
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
#ifndef _SAPI_BLD_
#define _SAPI_BLD_ 0x54
#endif
import "oaidl.idl";
import "ocidl.idl";
cpp_quote("#ifndef _SAPI_VER")
cpp_quote("#error \"you have to include <sapi.h> header before this.\"")
cpp_quote("#endif")
#ifndef LANGID
#define LANGID WORD
#endif
cpp_quote("#if 0")
typedef [restricted, hidden] struct WAVEFORMATEX {
WORD wFormatTag;
WORD nChannels;
DWORD nSamplesPerSec;
DWORD nAvgBytesPerSec;
WORD nBlockAlign;
WORD wBitsPerSample;
WORD cbSize;
} WAVEFORMATEX;
cpp_quote("#endif")
interface ISpNotifySource;
interface ISpNotifySink;
interface ISpNotifyTranslator;
interface ISpDataKey;
interface ISpObjectTokenCategory;
interface ISpObjectToken;
interface IEnumSpObjectTokens;
interface ISpObjectWithToken;
interface ISpResourceManager;
interface ISpEventSource;
interface ISpEventSink;
interface ISpStreamFormat;
interface ISpStream;
interface ISpStreamFormatConverter;
interface ISpAudio;
interface ISpMMSysAudio;
interface ISpTranscript;
interface ISpVoice;
interface ISpRecoResult;
interface ISpRecoContext;
interface ISpRecognizer;
interface ISpProperties;
interface ISpLexicon;
interface ISpPhoneConverter;
interface ISpPhrase;
#if _SAPI_BLD_ >= 0x53
interface ISpRecoContext2;
interface ISpRecognizer2;
interface ISpShortcut;
interface ISpPhoneticAlphabetConverter;
interface ISpPhoneticAlphabetSelection;
interface ISpRecoGrammar2;
interface ISpeechResourceLoader;
#endif
#if _SAPI_BLD_ >= 0x54
interface ISpRecognizer3;
#endif
typedef [hidden] enum SPDATAKEYLOCATION {
SPDKL_DefaultLocation = 0,
SPDKL_CurrentUser = 1,
SPDKL_LocalMachine = 2,
SPDKL_CurrentConfig = 5
} SPDATAKEYLOCATION;
typedef [hidden] enum SPSTREAMFORMAT {
SPSF_Default = -1,
SPSF_NoAssignedFormat = 0,
SPSF_Text,
SPSF_NonStandardFormat,
SPSF_ExtendedAudioFormat,
SPSF_8kHz8BitMono,
SPSF_8kHz8BitStereo,
SPSF_8kHz16BitMono,
SPSF_8kHz16BitStereo,
SPSF_11kHz8BitMono,
SPSF_11kHz8BitStereo,
SPSF_11kHz16BitMono,
SPSF_11kHz16BitStereo,
SPSF_12kHz8BitMono,
SPSF_12kHz8BitStereo,
SPSF_12kHz16BitMono,
SPSF_12kHz16BitStereo,
SPSF_16kHz8BitMono,
SPSF_16kHz8BitStereo,
SPSF_16kHz16BitMono,
SPSF_16kHz16BitStereo,
SPSF_22kHz8BitMono,
SPSF_22kHz8BitStereo,
SPSF_22kHz16BitMono,
SPSF_22kHz16BitStereo,
SPSF_24kHz8BitMono,
SPSF_24kHz8BitStereo,
SPSF_24kHz16BitMono,
SPSF_24kHz16BitStereo,
SPSF_32kHz8BitMono,
SPSF_32kHz8BitStereo,
SPSF_32kHz16BitMono,
SPSF_32kHz16BitStereo,
SPSF_44kHz8BitMono,
SPSF_44kHz8BitStereo,
SPSF_44kHz16BitMono,
SPSF_44kHz16BitStereo,
SPSF_48kHz8BitMono,
SPSF_48kHz8BitStereo,
SPSF_48kHz16BitMono,
SPSF_48kHz16BitStereo,
SPSF_TrueSpeech_8kHz1BitMono,
SPSF_CCITT_ALaw_8kHzMono,
SPSF_CCITT_ALaw_8kHzStereo,
SPSF_CCITT_ALaw_11kHzMono,
SPSF_CCITT_ALaw_11kHzStereo,
SPSF_CCITT_ALaw_22kHzMono,
SPSF_CCITT_ALaw_22kHzStereo,
SPSF_CCITT_ALaw_44kHzMono,
SPSF_CCITT_ALaw_44kHzStereo,
SPSF_CCITT_uLaw_8kHzMono,
SPSF_CCITT_uLaw_8kHzStereo,
SPSF_CCITT_uLaw_11kHzMono,
SPSF_CCITT_uLaw_11kHzStereo,
SPSF_CCITT_uLaw_22kHzMono,
SPSF_CCITT_uLaw_22kHzStereo,
SPSF_CCITT_uLaw_44kHzMono,
SPSF_CCITT_uLaw_44kHzStereo,
SPSF_ADPCM_8kHzMono,
SPSF_ADPCM_8kHzStereo,
SPSF_ADPCM_11kHzMono,
SPSF_ADPCM_11kHzStereo,
SPSF_ADPCM_22kHzMono,
SPSF_ADPCM_22kHzStereo,
SPSF_ADPCM_44kHzMono,
SPSF_ADPCM_44kHzStereo,
SPSF_GSM610_8kHzMono,
SPSF_GSM610_11kHzMono,
SPSF_GSM610_22kHzMono,
SPSF_GSM610_44kHzMono,
SPSF_NUM_FORMATS
} SPSTREAMFORMAT;
typedef [hidden] enum SPEVENTLPARAMTYPE {
SPET_LPARAM_IS_UNDEFINED = 0,
SPET_LPARAM_IS_TOKEN,
SPET_LPARAM_IS_OBJECT,
SPET_LPARAM_IS_POINTER,
SPET_LPARAM_IS_STRING
} SPEVENTLPARAMTYPE;
typedef [hidden] enum SPEVENTENUM {
SPEI_UNDEFINED = 0,
SPEI_START_INPUT_STREAM = 1,
SPEI_END_INPUT_STREAM = 2,
SPEI_VOICE_CHANGE = 3,
SPEI_TTS_BOOKMARK = 4,
SPEI_WORD_BOUNDARY = 5,
SPEI_PHONEME = 6,
SPEI_SENTENCE_BOUNDARY = 7,
SPEI_VISEME = 8,
SPEI_TTS_AUDIO_LEVEL = 9,
SPEI_TTS_PRIVATE = 15,
SPEI_MIN_TTS = 1,
SPEI_MAX_TTS = 15,
SPEI_END_SR_STREAM = 34,
SPEI_SOUND_START = 35,
SPEI_SOUND_END = 36,
SPEI_PHRASE_START = 37,
SPEI_RECOGNITION = 38,
SPEI_HYPOTHESIS = 39,
SPEI_SR_BOOKMARK = 40,
SPEI_PROPERTY_NUM_CHANGE = 41,
SPEI_PROPERTY_STRING_CHANGE= 42,
SPEI_FALSE_RECOGNITION = 43,
SPEI_INTERFERENCE = 44,
SPEI_REQUEST_UI = 45,
SPEI_RECO_STATE_CHANGE = 46,
SPEI_ADAPTATION = 47,
SPEI_START_SR_STREAM = 48,
SPEI_RECO_OTHER_CONTEXT = 49,
SPEI_SR_AUDIO_LEVEL = 50,
#if _SAPI_BLD_ >= 0x53
SPEI_SR_RETAINEDAUDIO = 51,
#endif
SPEI_SR_PRIVATE = 52,
#if _SAPI_BLD_ >= 0x53
#if _SAPI_BLD_ >= 0x54
SPEI_ACTIVE_CATEGORY_CHANGED = 53,
#else
SPEI_RESERVED4 = 53,
#endif
SPEI_RESERVED5 = 54,
SPEI_RESERVED6 = 55,
#endif
SPEI_MIN_SR = 34,
#if _SAPI_BLD_ >= 0x53
SPEI_MAX_SR = 55,
#else
SPEI_MAX_SR = 52,
#endif
SPEI_RESERVED1 = 30,
SPEI_RESERVED2 = 33,
SPEI_RESERVED3 = 63
} SPEVENTENUM;
typedef [hidden] enum SPINTERFERENCE {
SPINTERFERENCE_NONE = 0,
SPINTERFERENCE_NOISE,
SPINTERFERENCE_NOSIGNAL,
SPINTERFERENCE_TOOLOUD,
SPINTERFERENCE_TOOQUIET,
SPINTERFERENCE_TOOFAST,
SPINTERFERENCE_TOOSLOW,
SPINTERFERENCE_LATENCY_WARNING,
SPINTERFERENCE_LATENCY_TRUNCATE_BEGIN,
SPINTERFERENCE_LATENCY_TRUNCATE_END
} SPINTERFERENCE;
typedef [hidden] enum SPENDSRSTREAMFLAGS {
SPESF_NONE = 0,
SPESF_STREAM_RELEASED = 1
#if _SAPI_BLD_ >= 0x53
, SPESF_EMULATED = 2
#endif
} SPENDSRSTREAMFLAGS;
typedef [hidden] enum SPVFEATURE {
SPVFEATURE_STRESSED = 1,
SPVFEATURE_EMPHASIS = 2
} SPVFEATURE;
typedef [hidden] enum SPVISEMES {
SP_VISEME_0 = 0,
SP_VISEME_1,
SP_VISEME_2,
SP_VISEME_3,
SP_VISEME_4,
SP_VISEME_5,
SP_VISEME_6,
SP_VISEME_7,
SP_VISEME_8,
SP_VISEME_9,
SP_VISEME_10,
SP_VISEME_11,
SP_VISEME_12,
SP_VISEME_13,
SP_VISEME_14,
SP_VISEME_15,
SP_VISEME_16,
SP_VISEME_17,
SP_VISEME_18,
SP_VISEME_19,
SP_VISEME_20,
SP_VISEME_21,
} SPVISEMES;
typedef [hidden] enum SPFILEMODE {
SPFM_OPEN_READONLY,
SPFM_OPEN_READWRITE,
SPFM_CREATE,
SPFM_CREATE_ALWAYS,
SPFM_NUM_MODES
} SPFILEMODE;
typedef [hidden] enum _SPAUDIOSTATE {
SPAS_CLOSED,
SPAS_STOP,
SPAS_PAUSE,
SPAS_RUN
} SPAUDIOSTATE;
typedef [hidden] enum SPDISPLYATTRIBUTES {
SPAF_ONE_TRAILING_SPACE = 0x2,
SPAF_TWO_TRAILING_SPACES = 0x4,
SPAF_CONSUME_LEADING_SPACES = 0x8,
#if _SAPI_BLD_ >= 0x53
SPAF_BUFFER_POSITION = 0x10,
SPAF_ALL = 0x1f,
SPAF_USER_SPECIFIED = 0x80
#else
SPAF_ALL = 0x0f
#endif
} SPDISPLAYATTRIBUTES;
typedef [hidden] enum SPPHRASEPROPERTYUNIONTYPE {
SPPPUT_UNUSED = 0,
SPPPUT_ARRAY_INDEX
} SPPHRASEPROPERTYUNIONTYPE;
#if _SAPI_BLD_ >= 0x53
typedef enum SPSEMANTICFORMAT {
SPSMF_SAPI_PROPERTIES = 0,
SPSMF_SRGS_SEMANTICINTERPRETATION_MS = 1,
SPSMF_SRGS_SAPIPROPERTIES = 2,
SPSMF_UPS = 4,
SPSMF_SRGS_SEMANTICINTERPRETATION_W3C = 8
} SPSEMANTICFORMAT;
#endif
typedef [hidden] enum SPRECOEVENTFLAGS {
SPREF_AutoPause = 0x1,
SPREF_Emulated = 0x2
#if _SAPI_BLD_ >= 0x53
, SPREF_SMLTimeout = 0x4,
SPREF_ExtendableParse = 0x8,
SPREF_ReSent = 0x10,
SPREF_Hypothesis = 0x20,
SPREF_FalseRecognition = 0x40
#endif
} SPRECOEVENTFLAGS;
typedef [hidden] enum SPPARTOFSPEECH {
SPPS_NotOverriden = -1,
SPPS_Unknown = 0,
SPPS_Noun = 0x1000,
SPPS_Verb = 0x2000,
SPPS_Modifier = 0x3000,
SPPS_Function = 0x4000,
SPPS_Interjection = 0x5000
#if _SAPI_BLD_ >= 0x53
, SPPS_Noncontent = 0x6000,
SPPS_LMA = 0x7000,
SPPS_SuppressWord = 0xf000
#endif
} SPPARTOFSPEECH;
typedef [hidden] enum SPLEXICONTYPE {
eLEXTYPE_USER = 0x1,
eLEXTYPE_APP = 0x2,
eLEXTYPE_VENDORLEXICON = 0x4,
eLEXTYPE_LETTERTOSOUND = 0x8,
eLEXTYPE_MORPHOLOGY = 0x10,
eLEXTYPE_RESERVED4 = 0x20,
eLEXTYPE_USER_SHORTCUT = 0x40,
eLEXTYPE_RESERVED6 = 0x80,
eLEXTYPE_RESERVED7 = 0x100,
eLEXTYPE_RESERVED8 = 0x200,
eLEXTYPE_RESERVED9 = 0x400,
eLEXTYPE_RESERVED10 = 0x800,
eLEXTYPE_PRIVATE1 = 0x1000,
eLEXTYPE_PRIVATE2 = 0x2000,
eLEXTYPE_PRIVATE3 = 0x4000,
eLEXTYPE_PRIVATE4 = 0x8000,
eLEXTYPE_PRIVATE5 = 0x10000,
eLEXTYPE_PRIVATE6 = 0x20000,
eLEXTYPE_PRIVATE7 = 0x40000,
eLEXTYPE_PRIVATE8 = 0x80000,
eLEXTYPE_PRIVATE9 = 0x100000,
eLEXTYPE_PRIVATE10 = 0x200000,
eLEXTYPE_PRIVATE11 = 0x400000,
eLEXTYPE_PRIVATE12 = 0x800000,
eLEXTYPE_PRIVATE13 = 0x1000000,
eLEXTYPE_PRIVATE14 = 0x2000000,
eLEXTYPE_PRIVATE15 = 0x4000000,
eLEXTYPE_PRIVATE16 = 0x8000000,
eLEXTYPE_PRIVATE17 = 0x10000000,
eLEXTYPE_PRIVATE18 = 0x20000000,
eLEXTYPE_PRIVATE19 = 0x40000000,
eLEXTYPE_PRIVATE20 = 0x80000000u
} SPLEXICONTYPE;
typedef [hidden] enum SPWORDTYPE {
eWORDTYPE_ADDED = 1,
eWORDTYPE_DELETED = 2
} SPWORDTYPE;
#if _SAPI_BLD_ >= 0x53
typedef [hidden] enum SPPRONUNCIATIONFLAGS {
ePRONFLAG_USED = 1
} SPPRONUNCIATIONFLAGS;
typedef [hidden] enum SPSHORTCUTTYPE {
SPSHT_NotOverriden = -1,
SPSHT_Unknown = 0,
SPSHT_EMAIL = 0x1000,
SPSHT_OTHER = 0x2000,
SPPS_RESERVED1 = 0x3000,
SPPS_RESERVED2 = 0x4000,
SPPS_RESERVED3 = 0x5000,
SPPS_RESERVED4 = 0xf000
} SPSHORTCUTTYPE;
#endif
typedef [hidden] enum SPVALUETYPE {
SPDF_PROPERTY = 0x1,
SPDF_REPLACEMENT = 0x2,
SPDF_RULE = 0x4,
SPDF_DISPLAYTEXT = 0x8,
SPDF_LEXICALFORM = 0x10,
SPDF_PRONUNCIATION = 0x20,
SPDF_AUDIO = 0x40,
SPDF_ALTERNATES = 0x80,
SPDF_ALL = 0xff
} SPVALUETYPE;
typedef [hidden] enum SPPHRASERNG {
SPPR_ALL_ELEMENTS = -1
} SPPHRASERNG;
typedef [hidden] enum SPVACTIONS {
SPVA_Speak = 0,
SPVA_Silence,
SPVA_Pronounce,
SPVA_Bookmark,
SPVA_SpellOut,
SPVA_Section,
SPVA_ParseUnknownTag
} SPVACTIONS;
typedef [hidden] enum SPRUNSTATE {
SPRS_DONE = 1,
SPRS_IS_SPEAKING = 2
} SPRUNSTATE;
typedef [hidden] enum SPVLIMITS {
SPMIN_VOLUME = 0,
SPMAX_VOLUME = 100,
SPMIN_RATE = -10,
SPMAX_RATE = 10
} SPVLIMITS;
typedef [hidden] enum SPVPRIORITY {
SPVPRI_NORMAL = 0,
SPVPRI_ALERT = 1,
SPVPRI_OVER = 2
} SPVPRIORITY;
cpp_quote("EXTERN_C const GUID SPDFID_Text;")
cpp_quote("EXTERN_C const GUID SPDFID_WaveFormatEx;")
cpp_quote("")
const signed char SP_LOW_CONFIDENCE = -1;
const signed char SP_NORMAL_CONFIDENCE = 0;
const signed char SP_HIGH_CONFIDENCE = +1;
const float DEFAULT_WEIGHT = 1;
const ULONG SP_MAX_WORD_LENGTH = 128;
const ULONG SP_MAX_PRON_LENGTH = 384;
#if _SAPI_BLD_ >= 0x53
const ULONG SP_EMULATE_RESULT = 0x40000000;
#endif
cpp_quote("")
cpp_quote("#ifdef __cplusplus")
cpp_quote("interface ISpNotifyCallback {")
cpp_quote(" virtual HRESULT STDMETHODCALLTYPE NotifyCallback(WPARAM wParam, LPARAM lParam) = 0;")
cpp_quote("};")
cpp_quote("#else")
typedef void *ISpNotifyCallback;
cpp_quote("#endif")
cpp_quote("#if 0")
typedef void *SPNOTIFYCALLBACK;
cpp_quote("#else")
cpp_quote("typedef void __stdcall SPNOTIFYCALLBACK(WPARAM wParam, LPARAM lParam);")
cpp_quote("#endif")
[object, uuid (5eff4aef-8487-11d2-961c-00c04f8ee628), pointer_default (unique), restricted]
interface ISpNotifySource : IUnknown {
HRESULT SetNotifySink ([in] ISpNotifySink *pNotifySink);
[local] HRESULT SetNotifyWindowMessage ([in] HWND hWnd,[in] UINT Msg,[in] WPARAM wParam,[in] LPARAM lParam);
[local] HRESULT SetNotifyCallbackFunction ([in] SPNOTIFYCALLBACK *pfnCallback,[in] WPARAM wParam,[in] LPARAM lParam);
[local] HRESULT SetNotifyCallbackInterface ([in] ISpNotifyCallback *pSpCallback,[in] WPARAM wParam,[in] LPARAM lParam);
[local] HRESULT SetNotifyWin32Event (void);
[local] HRESULT WaitForNotifyEvent ([in] DWORD dwMilliseconds);
[local] HANDLE GetNotifyEventHandle ();
}
[object, uuid (259684dc-37c3-11d2-9603-00c04f8ee628), pointer_default (unique), restricted]
interface ISpNotifySink : IUnknown {
HRESULT Notify (void);
}
[object, local, uuid (ACA16614-5d3d-11d2-960e-00c04f8ee628), pointer_default (unique), restricted]
interface ISpNotifyTranslator : ISpNotifySink {
HRESULT InitWindowMessage ([in] HWND hWnd,[in] UINT Msg,[in] WPARAM wParam,[in] LPARAM lParam);
HRESULT InitCallback ([in] SPNOTIFYCALLBACK *pfnCallback,[in] WPARAM wParam,[in] LPARAM lParam);
HRESULT InitSpNotifyCallback ([in] ISpNotifyCallback *pSpCallback,[in] WPARAM wParam,[in] LPARAM lParam);
HRESULT InitWin32Event ([in] HANDLE hEvent,[in] WINBOOL fCloseHandleOnRelease);
HRESULT Wait ([in] DWORD dwMilliseconds);
HANDLE GetEventHandle ();
}
[object, local, uuid (14056581-E16C-11d2-BB90-00c04f8ee6c0), pointer_default (unique), restricted]
interface ISpDataKey : IUnknown {
HRESULT SetData ([in] LPCWSTR pszValueName,[in] ULONG cbData,[in] const BYTE *pData);
HRESULT GetData ([in] LPCWSTR pszValueName,[in] ULONG *pcbData,[out] BYTE *pData);
HRESULT SetStringValue ([in] LPCWSTR pszValueName,[in] LPCWSTR pszValue);
HRESULT GetStringValue ([in] LPCWSTR pszValueName,[out] LPWSTR *ppszValue);
HRESULT SetDWORD ([in] LPCWSTR pszValueName,[in] DWORD dwValue);
HRESULT GetDWORD ([in] LPCWSTR pszValueName,[out] DWORD *pdwValue);
HRESULT OpenKey ([in] LPCWSTR pszSubKeyName,[out] ISpDataKey **ppSubKey);
HRESULT CreateKey ([in] LPCWSTR pszSubKey,[out] ISpDataKey **ppSubKey);
HRESULT DeleteKey ([in] LPCWSTR pszSubKey);
HRESULT DeleteValue ([in] LPCWSTR pszValueName);
HRESULT EnumKeys ([in] ULONG Index,[out] LPWSTR *ppszSubKeyName);
HRESULT EnumValues ([in] ULONG Index,[out] LPWSTR *ppszValueName);
};
[object, uuid (5b559f40-E952-11d2-BB91-00c04f8ee6c0), pointer_default (unique), restricted]
interface ISpObjectWithToken : IUnknown {
HRESULT SetObjectToken ([in] ISpObjectToken *pToken);
HRESULT GetObjectToken ([out] ISpObjectToken **ppToken);
};
[object, local, uuid (06b64f9e-7fda-11d2-B4F2-00c04f797396), pointer_default (unique), restricted]
interface IEnumSpObjectTokens : IUnknown {
HRESULT Next ([in] ULONG celt,[out, size_is (celt), length_is (*pceltFetched)] ISpObjectToken **pelt,[out] ULONG *pceltFetched);
HRESULT Skip ([in] ULONG celt);
HRESULT Reset (void);
HRESULT Clone ([out] IEnumSpObjectTokens **ppEnum);
HRESULT Item ([in] ULONG Index,[out] ISpObjectToken **ppToken);
HRESULT GetCount ([out] ULONG *pCount);
};
[object, uuid (92a66e2b-C830-4149-83df-6fc2ba1e7a5b), pointer_default (unique), restricted]
interface ISpRegDataKey : ISpDataKey {
[local] HRESULT SetKey ([in] HKEY hkey,[in] WINBOOL fReadOnly);
}
[object, local, uuid (2d3d3845-39af-4850-BBF9-40b49780011d), pointer_default (unique), restricted]
interface ISpObjectTokenCategory : ISpDataKey {
HRESULT SetId ([in] LPCWSTR pszCategoryId,[in] WINBOOL fCreateIfNotExist);
HRESULT GetId ([out] LPWSTR *ppszCoMemCategoryId);
HRESULT GetDataKey ([in] SPDATAKEYLOCATION spdkl,[out] ISpDataKey **ppDataKey);
HRESULT EnumTokens ([in, string] LPCWSTR pzsReqAttribs,[in, string] LPCWSTR pszOptAttribs,[out] IEnumSpObjectTokens **ppEnum);
HRESULT SetDefaultTokenId ([in] LPCWSTR pszTokenId);
HRESULT GetDefaultTokenId ([out] LPWSTR *ppszCoMemTokenId);
};
[object, local, uuid (14056589-E16C-11d2-BB90-00c04f8ee6c0), pointer_default (unique), restricted]
interface ISpObjectToken : ISpDataKey {
HRESULT SetId (LPCWSTR pszCategoryId,[in] LPCWSTR pszTokenId,[in] WINBOOL fCreateIfNotExist);
HRESULT GetId ([out] LPWSTR *ppszCoMemTokenId);
HRESULT GetCategory ([out] ISpObjectTokenCategory **ppTokenCategory);
HRESULT CreateInstance ([in] IUnknown *pUnkOuter,[in] DWORD dwClsContext,[in] REFIID riid,[out, iid_is (riid)] void **ppvObject);
HRESULT GetStorageFileName ([in] REFCLSID clsidCaller,[in] LPCWSTR pszValueName,[in, string] LPCWSTR pszFileNameSpecifier,[in] ULONG nFolder,[out] LPWSTR *ppszFilePath);
HRESULT RemoveStorageFileName ([in] REFCLSID clsidCaller,[in] LPCWSTR pszKeyName,[in] WINBOOL fDeleteFile);
HRESULT Remove (const CLSID *pclsidCaller);
[local] HRESULT IsUISupported ([in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData,[in] IUnknown *punkObject,[out] WINBOOL *pfSupported);
[local] HRESULT DisplayUI ([in] HWND hwndParent,[in] LPCWSTR pszTitle,[in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData,[in] IUnknown *punkObject);
HRESULT MatchesAttributes ([in] LPCWSTR pszAttributes,[out] WINBOOL *pfMatches);
};
[object, uuid (B8AAB0CF-346f-49d8-9499-C8B03F161D51), pointer_default (unique), restricted]
interface ISpObjectTokenInit : ISpObjectToken {
HRESULT InitFromDataKey ([in] LPCWSTR pszCategoryId,[in] LPCWSTR pszTokenId,[in] ISpDataKey *pDataKey);
};
[object, uuid (93384e18-5014-43d5-ADBB-A78E055926BD), pointer_default (unique), restricted]
interface ISpResourceManager : IServiceProvider
{
HRESULT SetObject ([in] REFGUID guidServiceId,[in] IUnknown *pUnkObject);
HRESULT GetObject ([in] REFGUID guidServiceId,[in] REFCLSID ObjectCLSID,[in] REFIID ObjectIID,[in] WINBOOL fReleaseWhenLastExternalRefReleased,[out, iid_is (ObjectIID)] void **ppObject);
};
cpp_quote("#if 0")
typedef [restricted, hidden] struct SPEVENT {
WORD eEventId;
WORD elParamType;
ULONG ulStreamNum;
ULONGLONG ullAudioStreamOffset;
WPARAM wParam;
LPARAM lParam;
} SPEVENT;
typedef [restricted, hidden] struct SPSERIALIZEDEVENT {
WORD eEventId;
WORD elParamType;
ULONG ulStreamNum;
ULONGLONG ullAudioStreamOffset;
ULONG SerializedwParam;
LONG SerializedlParam;
} SPSERIALIZEDEVENT;
typedef [restricted, hidden] struct SPSERIALIZEDEVENT64 {
WORD eEventId;
WORD elParamType;
ULONG ulStreamNum;
ULONGLONG ullAudioStreamOffset;
ULONGLONG SerializedwParam;
LONGLONG SerializedlParam;
} SPSERIALIZEDEVENT64;
cpp_quote("#else")
cpp_quote("typedef struct SPEVENT {")
cpp_quote(" SPEVENTENUM eEventId : 16;")
cpp_quote(" SPEVENTLPARAMTYPE elParamType : 16;")
cpp_quote(" ULONG ulStreamNum;")
cpp_quote(" ULONGLONG ullAudioStreamOffset;")
cpp_quote(" WPARAM wParam;")
cpp_quote(" LPARAM lParam;")
cpp_quote("} SPEVENT;")
cpp_quote("")
cpp_quote("typedef struct SPSERIALIZEDEVENT {")
cpp_quote(" SPEVENTENUM eEventId : 16;")
cpp_quote(" SPEVENTLPARAMTYPE elParamType : 16;")
cpp_quote(" ULONG ulStreamNum;")
cpp_quote(" ULONGLONG ullAudioStreamOffset;")
cpp_quote(" ULONG SerializedwParam;")
cpp_quote(" LONG SerializedlParam;")
cpp_quote("} SPSERIALIZEDEVENT;")
cpp_quote("")
cpp_quote("typedef struct SPSERIALIZEDEVENT64 {")
cpp_quote(" SPEVENTENUM eEventId : 16;")
cpp_quote(" SPEVENTLPARAMTYPE elParamType : 16;")
cpp_quote(" ULONG ulStreamNum;")
cpp_quote(" ULONGLONG ullAudioStreamOffset;")
cpp_quote(" ULONGLONG SerializedwParam;")
cpp_quote(" LONGLONG SerializedlParam;")
cpp_quote("} SPSERIALIZEDEVENT64;")
cpp_quote("#endif")
#if _SAPI_BLD_ >= 0x53
cpp_quote("#if 0")
typedef [restricted, hidden] struct SPEVENTEX {
WORD eEventId;
WORD elParamType;
ULONG ulStreamNum;
ULONGLONG ullAudioStreamOffset;
WPARAM wParam;
LPARAM lParam;
ULONGLONG ullAudioTimeOffset;
} SPEVENTEX;
cpp_quote("#else")
cpp_quote("typedef struct SPEVENTEX {")
cpp_quote(" SPEVENTENUM eEventId : 16;")
cpp_quote(" SPEVENTLPARAMTYPE elParamType : 16;")
cpp_quote(" ULONG ulStreamNum;")
cpp_quote(" ULONGLONG ullAudioStreamOffset;")
cpp_quote(" WPARAM wParam;")
cpp_quote(" LPARAM lParam;")
cpp_quote(" ULONGLONG ullAudioTimeOffset;")
cpp_quote("} SPEVENTEX;")
cpp_quote("#endif")
#endif
typedef [restricted, hidden] struct SPEVENTSOURCEINFO {
ULONGLONG ullEventInterest;
ULONGLONG ullQueuedInterest;
ULONG ulCount;
} SPEVENTSOURCEINFO;
[object, local, uuid (BE7A9CCE-5f9e-11d2-960f-00c04f8ee628), pointer_default (unique), restricted]
interface ISpEventSource : ISpNotifySource {
HRESULT SetInterest ([in] ULONGLONG ullEventInterest,[in] ULONGLONG ullQueuedInterest);
HRESULT GetEvents ([in] ULONG ulCount,[out, size_is (ulCount)] SPEVENT *pEventArray,[out] ULONG *pulFetched);
HRESULT GetInfo ([out] SPEVENTSOURCEINFO *pInfo);
};
#if _SAPI_BLD_ >= 0x53
[object, local, uuid (2373a435-6a4b-429e-A6AC-D4231A61975B), pointer_default (unique), restricted]
interface ISpEventSource2 : ISpEventSource {
HRESULT GetEventsEx ([in] ULONG ulCount,[out, size_is (ulCount)] SPEVENTEX *pEventArray,[out] ULONG *pulFetched);
};
#endif
[object, local, uuid (BE7A9CC9-5f9e-11d2-960f-00c04f8ee628), pointer_default (unique), restricted]
interface ISpEventSink : IUnknown {
HRESULT AddEvents ([in] const SPEVENT *pEventArray,[in] ULONG ulCount);
HRESULT GetEventInterest ([out] ULONGLONG *pullEventInterest);
};
[object, uuid (BED530BE-2606-4f4d-A1C0-54c5cda5566f), pointer_default (unique), restricted]
interface ISpStreamFormat : IStream {
HRESULT GetFormat ([in] GUID *pguidFormatId,[out] WAVEFORMATEX **ppCoMemWaveFormatEx);
}
[object, local, uuid (12e3cca9-7518-44c5-A5E7-BA5A79CB929E), pointer_default (unique), restricted]
interface ISpStream : ISpStreamFormat {
HRESULT SetBaseStream ([in] IStream *pStream,[in] REFGUID rguidFormat,[in] const WAVEFORMATEX *pWaveFormatEx);
HRESULT GetBaseStream ([out] IStream **ppStream);
HRESULT BindToFile ([in] LPCWSTR pszFileName,[in] SPFILEMODE eMode,[in] const GUID *pFormatId, const WAVEFORMATEX *pWaveFormatEx,[in] ULONGLONG ullEventInterest);
HRESULT Close ();
}
[object, uuid (678a932c-EA71-4446-9b41-78fda6280a29), pointer_default (unique), restricted]
interface ISpStreamFormatConverter : ISpStreamFormat {
HRESULT SetBaseStream ([in] ISpStreamFormat *pStream,[in] WINBOOL fSetFormatToBaseStreamFormat,[in] WINBOOL fWriteToBaseStream);
HRESULT GetBaseStream ([out] ISpStreamFormat **ppStream);
HRESULT SetFormat ([in] REFGUID rguidFormatIdOfConvertedStream,[in] const WAVEFORMATEX *pWaveFormatExOfConvertedStream);
HRESULT ResetSeekPosition ();
HRESULT ScaleConvertedToBaseOffset ([in] ULONGLONG ullOffsetConvertedStream,[out] ULONGLONG *pullOffsetBaseStream);
HRESULT ScaleBaseToConvertedOffset ([in] ULONGLONG ullOffsetBaseStream,[out] ULONGLONG *pullOffsetConvertedStream);
};
typedef [restricted, hidden] struct SPAUDIOSTATUS {
long cbFreeBuffSpace;
ULONG cbNonBlockingIO;
SPAUDIOSTATE State;
ULONGLONG CurSeekPos;
ULONGLONG CurDevicePos;
DWORD dwAudioLevel;
DWORD dwReserved2;
} SPAUDIOSTATUS;
typedef [restricted, hidden] struct SPAUDIOBUFFERINFO {
ULONG ulMsMinNotification;
ULONG ulMsBufferSize;
ULONG ulMsEventBias;
} SPAUDIOBUFFERINFO;
[object, local, uuid (C05C768F-FAE8-4ec2-8e07-338321c12452), pointer_default (unique), restricted]
interface ISpAudio : ISpStreamFormat {
HRESULT SetState ([in] SPAUDIOSTATE NewState,[in] ULONGLONG ullReserved);
HRESULT SetFormat ([in] REFGUID rguidFmtId,[in] const WAVEFORMATEX *pWaveFormatEx);
HRESULT GetStatus ([out] SPAUDIOSTATUS *pStatus);
HRESULT SetBufferInfo ([in] const SPAUDIOBUFFERINFO *pBuffInfo);
HRESULT GetBufferInfo ([out] SPAUDIOBUFFERINFO *pBuffInfo);
HRESULT GetDefaultFormat ([out] GUID *pFormatId,[out] WAVEFORMATEX **ppCoMemWaveFormatEx);
HANDLE EventHandle ();
HRESULT GetVolumeLevel ([out] ULONG *pLevel);
HRESULT SetVolumeLevel ([in] ULONG Level);
HRESULT GetBufferNotifySize ([out] ULONG *pcbSize);
HRESULT SetBufferNotifySize ([in] ULONG cbSize);
};
[object, local, uuid (15806f6e-1d70-4b48-98e6-3b1a007509ab), pointer_default (unique), restricted]
interface ISpMMSysAudio : ISpAudio {
HRESULT GetDeviceId ([out] UINT *puDeviceId);
HRESULT SetDeviceId ([in] UINT uDeviceId);
HRESULT GetMMHandle ([out] void **pHandle);
HRESULT GetLineId ([out] UINT *puLineId);
HRESULT SetLineId ([in] UINT uLineId);
};
[object, uuid (10f63bce-201a-11d3-AC70-00c04f8ee6c0), pointer_default (unique), restricted]
interface ISpTranscript : IUnknown {
HRESULT GetTranscript ([out, string] LPWSTR *ppszTranscript);
HRESULT AppendTranscript ([in, string] LPCWSTR pszTranscript);
};
typedef WCHAR SPPHONEID;
typedef LPWSTR PSPPHONEID;
typedef LPCWSTR PCSPPHONEID;
typedef [restricted, hidden] struct SPPHRASEELEMENT {
ULONG ulAudioTimeOffset;
ULONG ulAudioSizeTime;
ULONG ulAudioStreamOffset;
ULONG ulAudioSizeBytes;
ULONG ulRetainedStreamOffset;
ULONG ulRetainedSizeBytes;
LPCWSTR pszDisplayText;
LPCWSTR pszLexicalForm;
const SPPHONEID *pszPronunciation;
BYTE bDisplayAttributes;
signed char RequiredConfidence;
signed char ActualConfidence;
BYTE Reserved;
float SREngineConfidence;
} SPPHRASEELEMENT;
typedef [restricted, hidden] struct SPPHRASERULE SPPHRASERULE;
typedef [restricted, hidden] struct SPPHRASEPROPERTY SPPHRASEPROPERTY;
struct SPPHRASERULE {
LPCWSTR pszName;
ULONG ulId;
ULONG ulFirstElement;
ULONG ulCountOfElements;
const SPPHRASERULE *pNextSibling;
const SPPHRASERULE *pFirstChild;
float SREngineConfidence;
signed char Confidence;
};
struct SPPHRASEPROPERTY {
LPCWSTR pszName;
union {
ULONG ulId;
struct {
byte bType;
byte bReserved;
unsigned short usArrayIndex;
};
};
LPCWSTR pszValue;
VARIANT vValue;
ULONG ulFirstElement;
ULONG ulCountOfElements;
const SPPHRASEPROPERTY *pNextSibling;
const SPPHRASEPROPERTY *pFirstChild;
float SREngineConfidence;
signed char Confidence;
};
typedef [restricted, hidden] struct SPPHRASEREPLACEMENT {
BYTE bDisplayAttributes;
LPCWSTR pszReplacementText;
ULONG ulFirstElement;
ULONG ulCountOfElements;
} SPPHRASEREPLACEMENT;
#if _SAPI_BLD_ >= 0x53
typedef [restricted, hidden] struct SPSEMANTICERRORINFO {
ULONG ulLineNumber;
LPWSTR pszScriptLine;
LPWSTR pszSource;
LPWSTR pszDescription;
HRESULT hrResultCode;
} SPSEMANTICERRORINFO;
#endif
#if _SAPI_BLD_ >= 0x53
typedef [restricted, hidden] struct SPPHRASE_50
#else
typedef [restricted, hidden] struct SPPHRASE
#endif
{
ULONG cbSize;
LANGID LangID;
WORD wHomophoneGroupId;
ULONGLONG ullGrammarID;
ULONGLONG ftStartTime;
ULONGLONG ullAudioStreamPosition;
ULONG ulAudioSizeBytes;
ULONG ulRetainedSizeBytes;
ULONG ulAudioSizeTime;
SPPHRASERULE Rule;
const SPPHRASEPROPERTY *pProperties;
const SPPHRASEELEMENT *pElements;
ULONG cReplacements;
const SPPHRASEREPLACEMENT *pReplacements;
GUID SREngineID;
ULONG ulSREnginePrivateDataSize;
const BYTE *pSREnginePrivateData;
}
#if _SAPI_BLD_ >= 0x53
SPPHRASE_50;
#else
SPPHRASE;
#endif
#if _SAPI_BLD_ >= 0x53
cpp_quote("#define SP_SPPHRASESIZE_500 sizeof (SPPHRASE_50)")
cpp_quote("#ifdef __cplusplus")
#if _SAPI_BLD_ > 0x53
cpp_quote("typedef struct SPPHRASE_53 : public SPPHRASE_50 {")
#else
cpp_quote("typedef struct SPPHRASE : public SPPHRASE_50 {")
#endif
cpp_quote(" LPWSTR pSML;")
cpp_quote(" SPSEMANTICERRORINFO* pSemanticErrorInfo;")
#if _SAPI_BLD_ > 0x53
cpp_quote("} SPPHRASE_53;")
#else
cpp_quote("} SPPHRASE;")
#endif
cpp_quote("#else")
#if _SAPI_BLD_ > 0x53
typedef [restricted, hidden] struct SPPHRASE_53
#else
typedef [restricted, hidden] struct SPPHRASE
#endif
{
ULONG cbSize;
LANGID LangID;
WORD wHomophoneGroupId;
ULONGLONG ullGrammarID;
ULONGLONG ftStartTime;
ULONGLONG ullAudioStreamPosition;
ULONG ulAudioSizeBytes;
ULONG ulRetainedSizeBytes;
ULONG ulAudioSizeTime;
SPPHRASERULE Rule;
const SPPHRASEPROPERTY *pProperties;
const SPPHRASEELEMENT *pElements;
ULONG cReplacements;
const SPPHRASEREPLACEMENT *pReplacements;
GUID SREngineID;
ULONG ulSREnginePrivateDataSize;
const BYTE *pSREnginePrivateData;
LPWSTR pSML;
SPSEMANTICERRORINFO *pSemanticErrorInfo;
}
#if _SAPI_BLD_ > 0x53
SPPHRASE_53;
#else
SPPHRASE;
#endif
cpp_quote("#endif")
#endif
#if _SAPI_BLD_ >= 0x54
cpp_quote("#define SP_SPPHRASESIZE_530 sizeof (SPPHRASE_53)")
cpp_quote("#ifdef __cplusplus")
cpp_quote("typedef struct SPPHRASE : public SPPHRASE_53 {")
cpp_quote(" SPSEMANTICFORMAT SemanticTagFormat;")
cpp_quote("} SPPHRASE;")
cpp_quote("#else")
typedef [restricted, hidden] struct SPPHRASE {
ULONG cbSize;
LANGID LangID;
WORD wHomophoneGroupId;
ULONGLONG ullGrammarID;
ULONGLONG ftStartTime;
ULONGLONG ullAudioStreamPosition;
ULONG ulAudioSizeBytes;
ULONG ulRetainedSizeBytes;
ULONG ulAudioSizeTime;
SPPHRASERULE Rule;
const SPPHRASEPROPERTY *pProperties;
const SPPHRASEELEMENT *pElements;
ULONG cReplacements;
const SPPHRASEREPLACEMENT *pReplacements;
GUID SREngineID;
ULONG ulSREnginePrivateDataSize;
const BYTE *pSREnginePrivateData;
LPWSTR pSML;
SPSEMANTICERRORINFO *pSemanticErrorInfo;
SPSEMANTICFORMAT SemanticTagFormat;
} SPPHRASE;
cpp_quote("#endif")
#endif
typedef [restricted, hidden] struct SPSERIALIZEDPHRASE {
ULONG ulSerializedSize;
} SPSERIALIZEDPHRASE;
#if _SAPI_BLD_ >= 0x53
typedef [restricted, hidden] struct SPRULE {
LPCWSTR pszRuleName;
ULONG ulRuleId;
DWORD dwAttributes;
} SPRULE;
#endif
typedef [hidden] struct SPBINARYGRAMMAR {
ULONG ulTotalSerializedSize;
} SPBINARYGRAMMAR;
cpp_quote("#if 0")
typedef void *SPSTATEHANDLE;
cpp_quote("#else")
cpp_quote("DECLARE_HANDLE(SPSTATEHANDLE);")
cpp_quote("#endif")
typedef [restricted, hidden] struct SPWORDPRONUNCIATION {
struct SPWORDPRONUNCIATION *pNextWordPronunciation;
SPLEXICONTYPE eLexiconType;
LANGID LangID;
WORD wPronunciationFlags;
SPPARTOFSPEECH ePartOfSpeech;
SPPHONEID szPronunciation[1];
} SPWORDPRONUNCIATION;
typedef [restricted, hidden] struct SPWORDPRONUNCIATIONLIST {
ULONG ulSize;
BYTE *pvBuffer;
SPWORDPRONUNCIATION *pFirstWordPronunciation;
} SPWORDPRONUNCIATIONLIST;
typedef [restricted, hidden] struct SPWORD {
struct SPWORD *pNextWord;
LANGID LangID;
WORD wReserved;
SPWORDTYPE eWordType;
LPWSTR pszWord;
SPWORDPRONUNCIATION *pFirstWordPronunciation;
} SPWORD;
typedef [restricted, hidden] struct SPWORDLIST {
ULONG ulSize;
BYTE *pvBuffer;
SPWORD *pFirstWord;
} SPWORDLIST;
[object, local, uuid (DA41A7C2-5383-4db2-916b-6c1719e3db58), pointer_default (unique), restricted]
interface ISpLexicon : IUnknown {
HRESULT GetPronunciations ([in] LPCWSTR pszWord,[in] LANGID LangID,[in] DWORD dwFlags,[in, out] SPWORDPRONUNCIATIONLIST *pWordPronunciationList);
HRESULT AddPronunciation ([in] LPCWSTR pszWord,[in] LANGID LangID,[in] SPPARTOFSPEECH ePartOfSpeech,[in] PCSPPHONEID pszPronunciation);
HRESULT RemovePronunciation ([in] LPCWSTR pszWord,[in] LANGID LangID,[in] SPPARTOFSPEECH ePartOfSpeech,[in] PCSPPHONEID pszPronunciation);
HRESULT GetGeneration ([out] DWORD *pdwGeneration);
HRESULT GetGenerationChange ([in] DWORD dwFlags,[in, out] DWORD *pdwGeneration,[in, out] SPWORDLIST *pWordList);
HRESULT GetWords ([in] DWORD dwFlags,[in, out] DWORD *pdwGeneration,[in, out] DWORD *pdwCookie,[in, out] SPWORDLIST *pWordList);
};
[object, uuid (8565572f-C094-41cc-B56E-10bd9c3ff044), pointer_default (unique), restricted]
interface ISpContainerLexicon : ISpLexicon {
HRESULT AddLexicon ([in] ISpLexicon *pAddLexicon,[in] DWORD dwFlags);
};
#if _SAPI_BLD_ >= 0x53
typedef [restricted, hidden] struct SPSHORTCUTPAIR {
struct SPSHORTCUTPAIR *pNextSHORTCUTPAIR;
LANGID LangID;
SPSHORTCUTTYPE shType;
LPWSTR pszDisplay;
LPWSTR pszSpoken;
} SPSHORTCUTPAIR;
typedef [restricted, hidden] struct SPSHORTCUTPAIRLIST {
ULONG ulSize;
BYTE *pvBuffer;
SPSHORTCUTPAIR *pFirstShortcutPair;
} SPSHORTCUTPAIRLIST;
#endif
#if _SAPI_BLD_ >= 0x53
[object, uuid (3df681e2-EA56-11d9-8bde-F66BAD1E3F3A), pointer_default (unique), restricted]
interface ISpShortcut : IUnknown {
HRESULT AddShortcut ([in] LPCWSTR pszDisplay,[in] LANGID LangID,[in] LPCWSTR pszSpoken,[in] SPSHORTCUTTYPE shType);
HRESULT RemoveShortcut ([in] LPCWSTR pszDisplay,[in] LANGID LangID,[in] LPCWSTR pszSpoken,[in] SPSHORTCUTTYPE shType);
HRESULT GetShortcuts ([in] LANGID LangID,[in, out] SPSHORTCUTPAIRLIST *pShortcutpairList);
HRESULT GetGeneration ([out] DWORD *pdwGeneration);
HRESULT GetWordsFromGenerationChange ([in, out] DWORD *pdwGeneration,[in, out] SPWORDLIST *pWordList);
HRESULT GetWords ([in, out] DWORD *pdwGeneration,[in, out] DWORD *pdwCookie,[in, out] SPWORDLIST *pWordList);
HRESULT GetShortcutsForGeneration ([in, out] DWORD *pdwGeneration,[in, out] DWORD *pdwCookie,[in, out] SPSHORTCUTPAIRLIST *pShortcutpairList);
HRESULT GetGenerationChange ([in, out] DWORD *pdwGeneration,[in, out] SPSHORTCUTPAIRLIST *pShortcutpairList);
};
#endif
[object, uuid (8445c581-0cac-4a38-ABFE-9b2ce2826455), pointer_default (unique), restricted]
interface ISpPhoneConverter : ISpObjectWithToken {
HRESULT PhoneToId ([in] LPCWSTR pszPhone,[out] SPPHONEID *pId);
HRESULT IdToPhone ([in] PCSPPHONEID pId,[out] WCHAR *pszPhone);
};
#if _SAPI_BLD_ >= 0x53
[object, local, uuid (133adcd4-19b4-4020-9fdc-842e78253b17), pointer_default (unique), restricted]
interface ISpPhoneticAlphabetConverter : IUnknown {
HRESULT GetLangId ([out] LANGID *pLangID);
HRESULT SetLangId ([in] LANGID LangID);
HRESULT SAPI2UPS ([in] const SPPHONEID *pszSAPIId,[out] SPPHONEID *pszUPSId,[in] DWORD cMaxLength);
HRESULT UPS2SAPI ([in] const SPPHONEID *pszUPSId,[out] SPPHONEID *pszSAPIId,[in] DWORD cMaxLength);
HRESULT GetMaxConvertLength ([in] DWORD cSrcLength,[in] WINBOOL bSAPI2UPS,[out] DWORD *pcMaxDestLength);
};
[object, uuid (B2745EFD-42ce-48ca-81f1-A96E02538A90), pointer_default (unique), restricted]
interface ISpPhoneticAlphabetSelection : IUnknown {
HRESULT IsAlphabetUPS ([out] WINBOOL *pfIsUPS);
HRESULT SetAlphabetToUPS ([in] WINBOOL fForceUPS);
};
#endif
typedef [restricted, hidden] struct SPVPITCH {
long MiddleAdj;
long RangeAdj;
} SPVPITCH;
typedef [restricted, hidden] struct SPVCONTEXT {
LPCWSTR pCategory;
LPCWSTR pBefore;
LPCWSTR pAfter;
} SPVCONTEXT;
typedef [restricted, hidden] struct SPVSTATE {
SPVACTIONS eAction;
LANGID LangID;
WORD wReserved;
long EmphAdj;
long RateAdj;
ULONG Volume;
SPVPITCH PitchAdj;
ULONG SilenceMSecs;
SPPHONEID *pPhoneIds;
SPPARTOFSPEECH ePartOfSpeech;
SPVCONTEXT Context;
} SPVSTATE;
typedef [restricted, hidden] struct SPVOICESTATUS {
ULONG ulCurrentStream;
ULONG ulLastStreamQueued;
HRESULT hrLastResult;
DWORD dwRunningState;
ULONG ulInputWordPos;
ULONG ulInputWordLen;
ULONG ulInputSentPos;
ULONG ulInputSentLen;
LONG lBookmarkId;
SPPHONEID PhonemeId;
SPVISEMES VisemeId;
DWORD dwReserved1;
DWORD dwReserved2;
} SPVOICESTATUS;
typedef [hidden] enum SPEAKFLAGS {
SPF_DEFAULT = 0,
SPF_ASYNC = 1,
SPF_PURGEBEFORESPEAK = 2,
SPF_IS_FILENAME = 4,
SPF_IS_XML = 8,
SPF_IS_NOT_XML = 0x10,
SPF_PERSIST_XML = 0x20,
SPF_NLP_SPEAK_PUNC = 0x40,
#if _SAPI_BLD_ >= 0x53
SPF_PARSE_SAPI = 0x80,
SPF_PARSE_SSML = 0x100,
SPF_PARSE_AUTODETECT = 0,
#endif
SPF_NLP_MASK = (SPF_NLP_SPEAK_PUNC),
#if _SAPI_BLD_ >= 0x53
SPF_PARSE_MASK = (SPF_PARSE_SAPI | SPF_PARSE_SSML),
SPF_VOICE_MASK = (SPF_ASYNC | SPF_PURGEBEFORESPEAK | SPF_IS_FILENAME | SPF_IS_XML | SPF_IS_NOT_XML | SPF_NLP_MASK | SPF_PERSIST_XML | SPF_PARSE_MASK),
#else
SPF_VOICE_MASK = (SPF_ASYNC | SPF_PURGEBEFORESPEAK | SPF_IS_FILENAME | SPF_IS_XML | SPF_IS_NOT_XML | SPF_NLP_MASK | SPF_PERSIST_XML),
#endif
SPF_UNUSED_FLAGS = ~ (SPF_VOICE_MASK)
} SPEAKFLAGS;
[object, local, uuid (6c44df74-72b9-4992-A1EC-EF996E0422D4), pointer_default (unique), restricted]
interface ISpVoice : ISpEventSource {
HRESULT SetOutput ([in] IUnknown *pUnkOutput,[in] WINBOOL fAllowFormatChanges);
HRESULT GetOutputObjectToken ([out] ISpObjectToken **ppObjectToken);
HRESULT GetOutputStream ([out] ISpStreamFormat **ppStream);
HRESULT Pause (void);
HRESULT Resume (void);
HRESULT SetVoice ([in] ISpObjectToken *pToken);
HRESULT GetVoice ([out] ISpObjectToken **ppToken);
HRESULT Speak ([in, string] LPCWSTR pwcs,[in] DWORD dwFlags,[out] ULONG *pulStreamNumber);
HRESULT SpeakStream ([in] IStream *pStream,[in] DWORD dwFlags,[out] ULONG *pulStreamNumber);
HRESULT GetStatus ([out] SPVOICESTATUS *pStatus,[out] LPWSTR *ppszLastBookmark);
HRESULT Skip ([in, string] LPCWSTR pItemType,[in] long lNumItems,[out] ULONG *pulNumSkipped);
HRESULT SetPriority ([in] SPVPRIORITY ePriority);
HRESULT GetPriority ([out] SPVPRIORITY *pePriority);
HRESULT SetAlertBoundary ([in] SPEVENTENUM eBoundary);
HRESULT GetAlertBoundary ([out] SPEVENTENUM *peBoundary);
HRESULT SetRate ([in] long RateAdjust);
HRESULT GetRate ([out] long *pRateAdjust);
HRESULT SetVolume ([in] USHORT usVolume);
HRESULT GetVolume ([out] USHORT *pusVolume);
HRESULT WaitUntilDone ([in] ULONG msTimeout);
HRESULT SetSyncSpeakTimeout ([in] ULONG msTimeout);
HRESULT GetSyncSpeakTimeout ([out] ULONG *pmsTimeout);
[local] HANDLE SpeakCompleteEvent ();
[local] HRESULT IsUISupported ([in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData,[out] WINBOOL *pfSupported);
[local] HRESULT DisplayUI ([in] HWND hwndParent,[in] LPCWSTR pszTitle,[in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData);
};
[object, local, uuid (1a5c0354-B621-4b5a-8791-D306ED379E53), pointer_default (unique), restricted]
interface ISpPhrase : IUnknown {
HRESULT GetPhrase ([out] SPPHRASE **ppCoMemPhrase);
HRESULT GetSerializedPhrase ([out] SPSERIALIZEDPHRASE **ppCoMemPhrase);
HRESULT GetText ([in] ULONG ulStart,[in] ULONG ulCount,[in] WINBOOL fUseTextReplacements,[out] LPWSTR *ppszCoMemText,[out, optional] BYTE *pbDisplayAttributes);
HRESULT Discard ([in] DWORD dwValueTypes);
};
[object, local, uuid (8fcebc98-4e49-4067-9c6c-D86A0E092E3D), pointer_default (unique), restricted]
interface ISpPhraseAlt : ISpPhrase {
HRESULT GetAltInfo ([out] ISpPhrase **ppParent,[out] ULONG *pulStartElementInParent,[out] ULONG *pcElementsInParent,[out] ULONG *pcElementsInAlt);
HRESULT Commit ();
};
#if _SAPI_BLD_ >= 0x53
typedef enum SPXMLRESULTOPTIONS {
SPXRO_SML = 0,
SPXRO_Alternates_SML = 1
} SPXMLRESULTOPTIONS;
#endif
#if _SAPI_BLD_ >= 0x53
[object, local, uuid (F264DA52-E457-4696-B856-A737B717AF79), pointer_default (unique), restricted]
interface ISpPhrase2 : ISpPhrase {
HRESULT GetXMLResult ([out] LPWSTR *ppszCoMemXMLResult,[in] SPXMLRESULTOPTIONS Options);
HRESULT GetXMLErrorInfo ([out] SPSEMANTICERRORINFO *pSemanticErrorInfo);
HRESULT GetAudio ([in] ULONG ulStartElement,[in] ULONG cElements,[out] ISpStreamFormat **ppStream);
};
#endif
typedef [restricted, hidden] struct SPRECORESULTTIMES {
FILETIME ftStreamTime;
ULONGLONG ullLength;
DWORD dwTickCount;
ULONGLONG ullStart;
} SPRECORESULTTIMES;
typedef [hidden] struct SPSERIALIZEDRESULT {
ULONG ulSerializedSize;
} SPSERIALIZEDRESULT;
[object, local, uuid (20b053be-E235-43cd-9a2a-8d17a48b7842), pointer_default (unique), restricted]
interface ISpRecoResult : ISpPhrase {
HRESULT GetResultTimes ([out] SPRECORESULTTIMES *pTimes);
HRESULT GetAlternates ([in] ULONG ulStartElement,[in] ULONG cElements,[in] ULONG ulRequestCount,[out] ISpPhraseAlt **ppPhrases,[out] ULONG *pcPhrasesReturned);
HRESULT GetAudio ([in] ULONG ulStartElement,[in] ULONG cElements,[out] ISpStreamFormat **ppStream);
HRESULT SpeakAudio ([in] ULONG ulStartElement,[in] ULONG cElements,[in] DWORD dwFlags,[out] ULONG *pulStreamNumber);
HRESULT Serialize ([out] SPSERIALIZEDRESULT **ppCoMemSerializedResult);
HRESULT ScaleAudio ([in] const GUID *pAudioFormatId,[in] const WAVEFORMATEX *pWaveFormatEx);
HRESULT GetRecoContext ([out] ISpRecoContext **ppRecoContext);
};
#if _SAPI_BLD_ >= 0x53
typedef [hidden] enum SPCOMMITFLAGS {
SPCF_NONE = 0,
SPCF_ADD_TO_USER_LEXICON = (1 << 0),
SPCF_DEFINITE_CORRECTION = (1 << 1)
} SPCOMMITFLAGS;
#endif
#if _SAPI_BLD_ >= 0x53
[object, local, uuid (27cac6c4-88f2-41f2-8817-0c95e59f1e6e), pointer_default (unique), restricted]
interface ISpRecoResult2 : ISpRecoResult {
HRESULT CommitAlternate ([in] ISpPhraseAlt *pPhraseAlt,[out] ISpRecoResult **ppNewResult);
HRESULT CommitText ([in] ULONG ulStartElement,[in] ULONG cElements,[in] LPCWSTR pszCorrectedData,[in] DWORD eCommitFlags);
HRESULT SetTextFeedback ([in, string] LPCWSTR pszFeedback,[in] WINBOOL fSuccessful);
}
[object, local, uuid (AE39362B-45a8-4074-9b9e-CCF49AA2D0B6), pointer_default (unique), restricted]
interface ISpXMLRecoResult : ISpRecoResult {
HRESULT GetXMLResult ([out] LPWSTR *ppszCoMemXMLResult,[in] SPXMLRESULTOPTIONS Options);
HRESULT GetXMLErrorInfo ([out] SPSEMANTICERRORINFO *pSemanticErrorInfo);
};
#endif
typedef [hidden] struct tagSPTEXTSELECTIONINFO {
ULONG ulStartActiveOffset;
ULONG cchActiveChars;
ULONG ulStartSelection;
ULONG cchSelection;
} SPTEXTSELECTIONINFO;
typedef [hidden] enum SPWORDPRONOUNCEABLE {
SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE = 0,
SPWP_UNKNOWN_WORD_PRONOUNCEABLE = 1,
SPWP_KNOWN_WORD_PRONOUNCEABLE = 2
} SPWORDPRONOUNCEABLE;
typedef [hidden] enum SPGRAMMARSTATE {
SPGS_DISABLED = 0,
SPGS_ENABLED = 1,
SPGS_EXCLUSIVE = 3
} SPGRAMMARSTATE;
typedef [hidden] enum SPCONTEXTSTATE {
SPCS_DISABLED = 0,
SPCS_ENABLED = 1,
} SPCONTEXTSTATE;
typedef [hidden] enum SPRULESTATE {
SPRS_INACTIVE = 0,
SPRS_ACTIVE = 1,
SPRS_ACTIVE_WITH_AUTO_PAUSE = 3
#if _SAPI_BLD_ >= 0x53
, SPRS_ACTIVE_USER_DELIMITED = 4
#endif
} SPRULESTATE;
const ULONGLONG SP_STREAMPOS_ASAP = 0;
const ULONGLONG SP_STREAMPOS_REALTIME = -1;
cpp_quote("#define SPRULETRANS_TEXTBUFFER (SPSTATEHANDLE) (-1)")
cpp_quote("#define SPRULETRANS_WILDCARD (SPSTATEHANDLE) (-2)")
cpp_quote("#define SPRULETRANS_DICTATION (SPSTATEHANDLE) (-3)")
typedef [hidden] enum SPGRAMMARWORDTYPE {
SPWT_DISPLAY,
SPWT_LEXICAL,
SPWT_PRONUNCIATION
#if _SAPI_BLD_ >= 0x53
, SPWT_LEXICAL_NO_SPECIAL_CHARS
#endif
} SPGRAMMARWORDTYPE;
typedef [hidden] struct tagSPPROPERTYINFO {
LPCWSTR pszName;
ULONG ulId;
LPCWSTR pszValue;
VARIANT vValue;
} SPPROPERTYINFO;
typedef [hidden] enum SPCFGRULEATTRIBUTES {
SPRAF_TopLevel = 0x1,
SPRAF_Active = 0x2,
SPRAF_Export = 0x4,
SPRAF_Import = 0x8,
SPRAF_Interpreter = 0x10,
SPRAF_Dynamic = 0x20,
#if _SAPI_BLD_ >= 0x53
SPRAF_Root = 0x40,
#endif
SPRAF_AutoPause = 0x10000
#if _SAPI_BLD_ >= 0x53
, SPRAF_UserDelimited = 0x20000
#endif
} SPCFGRULEATTRIBUTES;
[object, local, uuid (8137828f-591a-4a42-BE58-49ea7ebaac68), pointer_default (unique), restricted]
interface ISpGrammarBuilder : IUnknown {
HRESULT ResetGrammar ([in] LANGID NewLanguage);
HRESULT GetRule ([in] LPCWSTR pszRuleName,[in] DWORD dwRuleId,[in] DWORD dwAttributes,[in] WINBOOL fCreateIfNotExist,[out] SPSTATEHANDLE *phInitialState);
HRESULT ClearRule ([in] SPSTATEHANDLE hState);
HRESULT CreateNewState ([in] SPSTATEHANDLE hState,[out] SPSTATEHANDLE *phState);
HRESULT AddWordTransition ([in] SPSTATEHANDLE hFromState,[in] SPSTATEHANDLE hToState,[in] LPCWSTR psz,[in] LPCWSTR pszSeparators,[in] SPGRAMMARWORDTYPE eWordType,[in] float Weight,[in] const SPPROPERTYINFO *pPropInfo);
HRESULT AddRuleTransition ([in] SPSTATEHANDLE hFromState,[in] SPSTATEHANDLE hToState,[in] SPSTATEHANDLE hRule,[in] float Weight,[in] const SPPROPERTYINFO *pPropInfo);
HRESULT AddResource ([in] SPSTATEHANDLE hRuleState,[in] LPCWSTR pszResourceName,[in] LPCWSTR pszResourceValue);
HRESULT Commit ([in] DWORD dwReserved);
};
typedef [hidden] enum SPLOADOPTIONS {
SPLO_STATIC = 0,
SPLO_DYNAMIC = 1
} SPLOADOPTIONS;
[object, local, uuid (2177db29-7f45-47d0-8554-067e91c80502), pointer_default (unique), restricted]
interface ISpRecoGrammar : ISpGrammarBuilder {
HRESULT GetGrammarId ([out] ULONGLONG *pullGrammarId);
HRESULT GetRecoContext ([out] ISpRecoContext **ppRecoCtxt);
HRESULT LoadCmdFromFile ([in, string] LPCWSTR pszFileName,[in] SPLOADOPTIONS Options);
HRESULT LoadCmdFromObject ([in] REFCLSID rcid,[in, string] LPCWSTR pszGrammarName,[in] SPLOADOPTIONS Options);
HRESULT LoadCmdFromResource ([in] HMODULE hModule,[in, string] LPCWSTR pszResourceName,[in, string] LPCWSTR pszResourceType,[in] WORD wLanguage,[in] SPLOADOPTIONS Options);
HRESULT LoadCmdFromMemory ([in] const SPBINARYGRAMMAR *pGrammar,[in] SPLOADOPTIONS Options);
HRESULT LoadCmdFromProprietaryGrammar ([in] REFGUID rguidParam,[in, string] LPCWSTR pszStringParam,[in] const void *pvDataPrarm,[in] ULONG cbDataSize,[in] SPLOADOPTIONS Options);
HRESULT SetRuleState ([in, string] LPCWSTR pszName,[in] void *pReserved,[in] SPRULESTATE NewState);
HRESULT SetRuleIdState ([in] ULONG ulRuleId,[in] SPRULESTATE NewState);
HRESULT LoadDictation ([in, string] LPCWSTR pszTopicName,[in] SPLOADOPTIONS Options);
HRESULT UnloadDictation ();
HRESULT SetDictationState ([in] SPRULESTATE NewState);
HRESULT SetWordSequenceData ([in] const WCHAR *pText,[in] ULONG cchText,[in] const SPTEXTSELECTIONINFO *pInfo);
HRESULT SetTextSelection ([in] const SPTEXTSELECTIONINFO *pInfo);
HRESULT IsPronounceable ([in, string] LPCWSTR pszWord,[out] SPWORDPRONOUNCEABLE *pWordPronounceable);
HRESULT SetGrammarState ([in] SPGRAMMARSTATE eGrammarState);
HRESULT SaveCmd ([in] IStream *pStream,[out, optional] LPWSTR *ppszCoMemErrorText);
HRESULT GetGrammarState ([out] SPGRAMMARSTATE *peGrammarState);
};
#if _SAPI_BLD_ >= 0x53
typedef enum SPMATCHINGMODE {
AllWords = 0,
Subsequence = 1,
OrderedSubset = 3,
SubsequenceContentRequired = 5,
OrderedSubsetContentRequired = 7
} SPMATCHINGMODE;
typedef enum PHONETICALPHABET {
PA_Ipa = 0,
PA_Ups = 1,
PA_Sapi = 2,
} PHONETICALPHABET;
#endif
#if _SAPI_BLD_ >= 0x53
[object, local, uuid (8ab10026-20cc-4b20-8c22-A49C9BA78F60), pointer_default (unique), restricted]
interface ISpGrammarBuilder2 : IUnknown {
HRESULT AddTextSubset ([in] SPSTATEHANDLE hFromState,[in] SPSTATEHANDLE hToState,[in] LPCWSTR psz,[in] SPMATCHINGMODE eMatchMode);
HRESULT SetPhoneticAlphabet ([in] PHONETICALPHABET phoneticALphabet);
}
cpp_quote("#define SPRP_NORMAL 0")
[object, local, uuid (4b37bc9e-9ed6-44a3-93d3-18f022b79ec3), pointer_default (unique), restricted]
interface ISpRecoGrammar2 : IUnknown {
HRESULT GetRules ([out] SPRULE **ppCoMemRules,[out] UINT *puNumRules);
HRESULT LoadCmdFromFile2 ([in, string] LPCWSTR pszFileName,[in] SPLOADOPTIONS Options,[in, string] LPCWSTR pszSharingUri,[in, string] LPCWSTR pszBaseUri);
HRESULT LoadCmdFromMemory2 ([in] const SPBINARYGRAMMAR *pGrammar,[in] SPLOADOPTIONS Options,[in, string] LPCWSTR pszSharingUri,[in, string] LPCWSTR pszBaseUri);
HRESULT SetRulePriority ([in, string] LPCWSTR pszRuleName,[in] ULONG ulRuleId,[in] int nRulePriority);
HRESULT SetRuleWeight ([in, string] LPCWSTR pszRuleName,[in] ULONG ulRuleId,[in] float flWeight);
HRESULT SetDictationWeight ([in] float flWeight);
HRESULT SetGrammarLoader ([in] ISpeechResourceLoader *pLoader);
HRESULT SetSMLSecurityManager ([in] IInternetSecurityManager *pSMLSecurityManager);
}
[object, local, uuid (B9AC5783-FCD0-4b21-B119-B4F8DA8FD2C3), pointer_default (unique), dual]
interface ISpeechResourceLoader : IDispatch {
[id (1)] HRESULT LoadResource ([in] BSTR bstrResourceUri,[in] VARIANT_BOOL fAlwaysReload,[out] IUnknown **pStream,[out] BSTR *pbstrMIMEType,[out] VARIANT_BOOL *pfModified,[out] BSTR *pbstrRedirectUrl);
[id (2)] HRESULT GetLocalCopy ([in] BSTR bstrResourceUri,[out] BSTR *pbstrLocalPath,[out] BSTR *pbstrMIMEType,[out] BSTR *pbstrRedirectUrl);
[id (3)] HRESULT ReleaseLocalCopy ([in] BSTR pbstrLocalPath);
}
#endif
typedef [restricted, hidden] struct SPRECOCONTEXTSTATUS {
SPINTERFERENCE eInterference;
WCHAR szRequestTypeOfUI[255];
DWORD dwReserved1;
DWORD dwReserved2;
} SPRECOCONTEXTSTATUS;
typedef [hidden] enum SPBOOKMARKOPTIONS {
SPBO_NONE = 0,
SPBO_PAUSE = 0x1
#if _SAPI_BLD_ >= 0x53
, SPBO_AHEAD = 0x2,
SPBO_TIME_UNITS = 0x4
#endif
} SPBOOKMARKOPTIONS;
typedef [hidden] enum SPAUDIOOPTIONS {
SPAO_NONE = 0,
SPAO_RETAIN_AUDIO = 0x1
} SPAUDIOOPTIONS;
[object, local, uuid (F740A62F-7c15-489e-8234-940a33d9272d), pointer_default (unique), restricted]
interface ISpRecoContext : ISpEventSource {
HRESULT GetRecognizer ([out] ISpRecognizer **ppRecognizer);
HRESULT CreateGrammar ([in] ULONGLONG ullGrammarId,[out] ISpRecoGrammar **ppGrammar);
HRESULT GetStatus ([out] SPRECOCONTEXTSTATUS *pStatus);
HRESULT GetMaxAlternates ([in] ULONG *pcAlternates);
HRESULT SetMaxAlternates ([in] ULONG cAlternates);
HRESULT SetAudioOptions ([in] SPAUDIOOPTIONS Options,[in] const GUID *pAudioFormatId,[in] const WAVEFORMATEX *pWaveFormatEx);
HRESULT GetAudioOptions ([in] SPAUDIOOPTIONS *pOptions,[out] GUID *pAudioFormatId,[out] WAVEFORMATEX **ppCoMemWFEX);
HRESULT DeserializeResult ([in] const SPSERIALIZEDRESULT *pSerializedResult,[out] ISpRecoResult **ppResult);
HRESULT Bookmark ([in] SPBOOKMARKOPTIONS Options,[in] ULONGLONG ullStreamPosition,[in] LPARAM lparamEvent);
HRESULT SetAdaptationData ([in, string] LPCWSTR pAdaptationData,[in] const ULONG cch);
HRESULT Pause ([in] DWORD dwReserved);
HRESULT Resume ([in] DWORD dwReserved);
HRESULT SetVoice ([in] ISpVoice *pVoice,[in] WINBOOL fAllowFormatChanges);
HRESULT GetVoice ([out] ISpVoice **ppVoice);
HRESULT SetVoicePurgeEvent ([in] ULONGLONG ullEventInterest);
HRESULT GetVoicePurgeEvent ([out] ULONGLONG *pullEventInterest);
HRESULT SetContextState ([in] SPCONTEXTSTATE eContextState);
HRESULT GetContextState ([out] SPCONTEXTSTATE *peContextState);
};
#if _SAPI_BLD_ >= 0x53
typedef [hidden] enum SPGRAMMAROPTIONS {
SPGO_SAPI = 0x1,
SPGO_SRGS = 0x2,
SPGO_UPS = 0x4,
SPGO_SRGS_MS_SCRIPT = 0x8,
SPGO_FILE = 0x10,
SPGO_HTTP = 0x20,
SPGO_RES = 0x40,
SPGO_OBJECT = 0x80,
SPGO_SRGS_W3C_SCRIPT = 0x100,
SPGO_SRGS_STG_SCRIPT = 0x200,
SPGO_SRGS_SCRIPT = SPGO_SRGS | SPGO_SRGS_MS_SCRIPT | SPGO_SRGS_W3C_SCRIPT | SPGO_SRGS_STG_SCRIPT,
SPGO_DEFAULT = 0x03fb,
SPGO_ALL = 0x03ff
} SPGRAMMAROPTIONS;
typedef [hidden] enum SPADAPTATIONSETTINGS {
SPADS_Default = 0x0,
SPADS_CurrentRecognizer = 0x1,
SPADS_RecoProfile = 0x2,
SPADS_Immediate = 0x4,
SPADS_Reset = 0x8,
SPADS_HighVolumeDataSource = 0x10
} SPADAPTATIONSETTINGS;
typedef [hidden] enum SPADAPTATIONRELEVANCE {
SPAR_Unknown = 0,
SPAR_Low = 1,
SPAR_Medium = 2,
SPAR_High = 3
} SPADAPTATIONRELEVANCE;
#endif
#if _SAPI_BLD_ >= 0x53
[object, local, uuid (BEAD311C-52ff-437f-9464-6b21054ca73d), pointer_default (unique), restricted]
interface ISpRecoContext2 : IUnknown {
HRESULT SetGrammarOptions ([in] DWORD eGrammarOptions);
HRESULT GetGrammarOptions ([out] DWORD *peGrammarOptions);
HRESULT SetAdaptationData2 ([in] LPCWSTR pAdaptationData,[in] const ULONG cch,[in] LPCWSTR pTopicName,[in] DWORD eAdaptationSettings,[in] SPADAPTATIONRELEVANCE eRelevance);
}
#endif
[object, local, uuid (5b4fb971-B115-4de1-AD97-E482E3BF6EE4), pointer_default (unique), restricted]
interface ISpProperties : IUnknown {
HRESULT SetPropertyNum ([in] LPCWSTR pName,[in] LONG lValue);
HRESULT GetPropertyNum ([in] LPCWSTR pName,[out] LONG *plValue);
HRESULT SetPropertyString ([in] LPCWSTR pName,[in] LPCWSTR pValue);
HRESULT GetPropertyString ([in] LPCWSTR pName,[out, string] LPWSTR *ppCoMemValue);
};
const ULONG SP_MAX_LANGIDS = 20;
typedef [restricted, hidden] struct SPRECOGNIZERSTATUS {
SPAUDIOSTATUS AudioStatus;
ULONGLONG ullRecognitionStreamPos;
ULONG ulStreamNumber;
ULONG ulNumActive;
CLSID clsidEngine;
ULONG cLangIDs;
LANGID aLangID[SP_MAX_LANGIDS];
ULONGLONG ullRecognitionStreamTime;
} SPRECOGNIZERSTATUS;
typedef [hidden] enum SPWAVEFORMATTYPE {
SPWF_INPUT,
SPWF_SRENGINE
} SPSTREAMFORMATTYPE;
typedef [hidden] enum SPRECOSTATE {
SPRST_INACTIVE,
SPRST_ACTIVE,
SPRST_ACTIVE_ALWAYS,
SPRST_INACTIVE_WITH_PURGE,
SPRST_NUM_STATES
} SPRECOSTATE;
#if _SAPI_BLD_ >= 0x54
typedef enum SPCATEGORYTYPE {
SPCT_COMMAND,
SPCT_DICTATION,
SPCT_SLEEP,
SPCT_SUB_COMMAND,
SPCT_SUB_DICTATION
} SPCATEGORYTYPE;
#endif
[object, local, uuid (C2B5F241-DAA0-4507-9e16-5a1eaa2b7a5c), pointer_default (unique), restricted]
interface ISpRecognizer : ISpProperties {
HRESULT SetRecognizer ([in] ISpObjectToken *pRecognizer);
HRESULT GetRecognizer ([out] ISpObjectToken **ppRecognizer);
HRESULT SetInput ([in] IUnknown *pUnkInput,[in] WINBOOL fAllowFormatChanges);
HRESULT GetInputObjectToken ([out] ISpObjectToken **ppToken);
HRESULT GetInputStream ([out] ISpStreamFormat **ppStream);
HRESULT CreateRecoContext ([out] ISpRecoContext **ppNewCtxt);
HRESULT GetRecoProfile ([out] ISpObjectToken **ppToken);
HRESULT SetRecoProfile ([in] ISpObjectToken *pToken);
HRESULT IsSharedInstance (void);
HRESULT GetRecoState ([out] SPRECOSTATE *pState);
HRESULT SetRecoState ([in] SPRECOSTATE NewState);
HRESULT GetStatus ([out] SPRECOGNIZERSTATUS *pStatus);
HRESULT GetFormat ([in] SPSTREAMFORMATTYPE WaveFormatType,[out] GUID *pFormatId,[out] WAVEFORMATEX **ppCoMemWFEX);
[local] HRESULT IsUISupported ([in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData,[out] WINBOOL *pfSupported);
[local] HRESULT DisplayUI ([in] HWND hwndParent,[in] LPCWSTR pszTitle,[in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData);
HRESULT EmulateRecognition ([in] ISpPhrase *pPhrase);
};
#if _SAPI_BLD_ >= 0x53
[object, uuid (21b501a0-0ec7-46c9-92c3-A2BC784C54B9), pointer_default (unique), restricted]
interface ISpSerializeState : IUnknown {
HRESULT GetSerializedState ([out] BYTE **ppbData,[out] ULONG *pulSize,[in] DWORD dwReserved);
HRESULT SetSerializedState ([in] BYTE *pbData,[in] ULONG ulSize,[in] DWORD dwReserved);
};
[object, local, uuid (8fc6d974-C81E-4098-93c5-0147f61ed4d3), pointer_default (unique), restricted]
interface ISpRecognizer2 : IUnknown {
HRESULT EmulateRecognitionEx ([in] ISpPhrase *pPhrase,[in] DWORD dwCompareFlags);
HRESULT SetTrainingState ([in] WINBOOL fDoingTraining,[in] WINBOOL fAdaptFromTrainingData);
HRESULT ResetAcousticModelAdaptation ();
}
#if _SAPI_BLD_ >= 0x54
[object, local, uuid (DA0CD0F9-14a2-4f09-8c2a-85cc48979345), pointer_default (unique), restricted]
interface ISpRecoCategory : IUnknown {
HRESULT GetType ([out] SPCATEGORYTYPE *peCategoryType);
}
[object, local, uuid (DF1B943C-5838-4aa2-8706-D7CD5B333499), pointer_default (unique), restricted]
interface ISpRecognizer3 : IUnknown {
HRESULT GetCategory ([in] SPCATEGORYTYPE categoryType,[out] ISpRecoCategory **ppCategory);
HRESULT SetActiveCategory ([in] ISpRecoCategory *pCategory);
HRESULT GetActiveCategory ([out] ISpRecoCategory **ppCategory);
}
#endif
typedef [restricted, hidden] struct SPNORMALIZATIONLIST {
ULONG ulSize;
WCHAR **ppszzNormalizedList;
} SPNORMALIZATIONLIST;
[object, local, uuid (C360CE4B-76d1-4214-AD68-52657d5083da), pointer_default (unique), restricted]
interface ISpEnginePronunciation : IUnknown {
HRESULT Normalize ([in, string] LPCWSTR pszWord,[in, string] LPCWSTR pszLeftContext,[in, string] LPCWSTR pszRightContext,[in] LANGID LangID,[out] SPNORMALIZATIONLIST *pNormalizationList);
HRESULT GetPronunciations ([in, string] LPCWSTR pszWord,[in, string] LPCWSTR pszLeftContext,[in, string] LPCWSTR pszRightContext,[in] LANGID LangID,[in, out] SPWORDPRONUNCIATIONLIST *pEnginePronunciationList);
}
typedef [restricted, hidden] struct SPDISPLAYTOKEN {
const WCHAR *pszLexical;
const WCHAR *pszDisplay;
BYTE bDisplayAttributes;
} SPDISPLAYTOKEN;
typedef [restricted, hidden] struct SPDISPLAYPHRASE {
ULONG ulNumTokens;
SPDISPLAYTOKEN *pTokens;
} SPDISPLAYPHRASE;
[object, local, uuid (C8D7C7E2-0dde-44b7-AFE3-B0C991FBEB5E), pointer_default (unique)]
interface ISpDisplayAlternates : IUnknown {
HRESULT GetDisplayAlternates ([in] const SPDISPLAYPHRASE *pPhrase,[in] ULONG cRequestCount,[out] SPDISPLAYPHRASE **ppCoMemPhrases,[out] ULONG *pcPhrasesReturned);
HRESULT SetFullStopTrailSpace ([in] ULONG ulTrailSpace);
}
#endif
[uuid (C866CA3A-32f7-11d2-9602-00c04f8ee628), version (5.4)]
library SpeechLib {
importlib ("stdole32.tlb");
importlib ("stdole2.tlb");
interface ISpeechDataKey;
interface ISpeechObjectToken;
interface ISpeechObjectTokens;
interface ISpeechObjectTokenCategory;
interface ISpeechAudioBufferInfo;
interface ISpeechAudioStatus;
interface ISpeechAudioFormat;
interface ISpeechWaveFormatEx;
interface ISpeechBaseStream;
interface ISpeechFileStream;
interface ISpeechMemoryStream;
interface ISpeechCustomStream;
interface ISpeechAudio;
interface ISpeechMMSysAudio;
interface ISpeechVoice;
interface ISpeechVoiceStatus;
dispinterface _ISpeechVoiceEvents;
interface ISpeechRecognizer;
interface ISpeechRecognizerStatus;
interface ISpeechRecoContext;
interface ISpeechRecoGrammar;
dispinterface _ISpeechRecoContextEvents;
interface ISpeechGrammarRule;
interface ISpeechGrammarRules;
interface ISpeechGrammarRuleState;
interface ISpeechGrammarRuleStateTransition;
interface ISpeechGrammarRuleStateTransitions;
interface ISpeechTextSelectionInformation;
interface ISpeechRecoResult;
#if _SAPI_BLD_ >= 0x53
interface ISpeechRecoResult2;
#endif
interface ISpeechRecoResultTimes;
interface ISpeechPhraseAlternate;
interface ISpeechPhraseAlternates;
interface ISpeechPhraseInfo;
interface ISpeechPhraseElement;
interface ISpeechPhraseElements;
interface ISpeechPhraseReplacement;
interface ISpeechPhraseReplacements;
interface ISpeechPhraseProperty;
interface ISpeechPhraseProperties;
interface ISpeechPhraseRule;
interface ISpeechPhraseRules;
interface ISpeechLexicon;
interface ISpeechLexiconWords;
interface ISpeechLexiconWord;
interface ISpeechLexiconPronunciations;
interface ISpeechLexiconPronunciation;
typedef long SpeechLanguageId;
cpp_quote("#define __SpeechStringConstants_MODULE_DEFINED__")
[uuid (E58442E4-0c80-402c-9559-867337a39765)] module SpeechStringConstants {
const BSTR SpeechRegistryUserRoot = L"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech";
const BSTR SpeechRegistryLocalMachineRoot = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech";
const BSTR SpeechCategoryAudioOut = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioOutput";
const BSTR SpeechCategoryAudioIn = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioInput";
const BSTR SpeechCategoryVoices = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices";
const BSTR SpeechCategoryRecognizers = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Recognizers";
const BSTR SpeechCategoryAppLexicons = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AppLexicons";
const BSTR SpeechCategoryPhoneConverters = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\PhoneConverters";
const BSTR SpeechCategoryRecoProfiles = L"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\RecoProfiles";
const BSTR SpeechTokenIdUserLexicon = L"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\CurrentUserLexicon";
const BSTR SpeechTokenValueCLSID = L"CLSID";
const BSTR SpeechTokenKeyFiles = L"Files";
const BSTR SpeechTokenKeyUI = L"UI";
const BSTR SpeechTokenKeyAttributes = L"Attributes";
const BSTR SpeechVoiceCategoryTTSRate = L"DefaultTTSRate";
const BSTR SpeechPropertyResourceUsage = L"ResourceUsage";
const BSTR SpeechPropertyHighConfidenceThreshold = L"HighConfidenceThreshold";
const BSTR SpeechPropertyNormalConfidenceThreshold = L"NormalConfidenceThreshold";
const BSTR SpeechPropertyLowConfidenceThreshold = L"LowConfidenceThreshold";
const BSTR SpeechPropertyResponseSpeed = L"ResponseSpeed";
const BSTR SpeechPropertyComplexResponseSpeed = L"ComplexResponseSpeed";
const BSTR SpeechPropertyAdaptationOn = L"AdaptationOn";
const BSTR SpeechDictationTopicSpelling = L"Spelling";
const BSTR SpeechGrammarTagWildcard = L"...";
const BSTR SpeechGrammarTagDictation = L"*";
const BSTR SpeechGrammarTagUnlimitedDictation = L"*+";
const BSTR SpeechEngineProperties = L"EngineProperties";
const BSTR SpeechAddRemoveWord = L"AddRemoveWord";
const BSTR SpeechUserTraining = L"UserTraining";
const BSTR SpeechMicTraining = L"MicTraining";
const BSTR SpeechRecoProfileProperties = L"RecoProfileProperties";
const BSTR SpeechAudioProperties = L"AudioProperties";
const BSTR SpeechAudioVolume = L"AudioVolume";
const BSTR SpeechVoiceSkipTypeSentence = L"Sentence";
const BSTR SpeechAudioFormatGUIDWave = L"{C31ADBAE-527F-4ff5-A230-F62BB61FF70C}";
const BSTR SpeechAudioFormatGUIDText = L"{7CEEF9F9-3D13-11d2-9EE7-00C04F797396}";
};
[uuid (F3E092B2-6bdc-410f-BCB2-4c5ed4424180)] module SpeechConstants {
const float Speech_Default_Weight = DEFAULT_WEIGHT;
const LONG Speech_Max_Word_Length = SP_MAX_WORD_LENGTH;
const LONG Speech_Max_Pron_Length = SP_MAX_PRON_LENGTH;
const LONG Speech_StreamPos_Asap = SP_STREAMPOS_ASAP;
const LONG Speech_StreamPos_RealTime = SP_STREAMPOS_REALTIME;
const LONG SpeechAllElements = SPPR_ALL_ELEMENTS;
};
typedef [hidden] enum DISPID_SpeechDataKey {
DISPID_SDKSetBinaryValue = 1,
DISPID_SDKGetBinaryValue,
DISPID_SDKSetStringValue,
DISPID_SDKGetStringValue,
DISPID_SDKSetLongValue,
DISPID_SDKGetlongValue,
DISPID_SDKOpenKey,
DISPID_SDKCreateKey,
DISPID_SDKDeleteKey,
DISPID_SDKDeleteValue,
DISPID_SDKEnumKeys,
DISPID_SDKEnumValues
} DISPID_SpeechDataKey;
typedef [hidden] enum DISPID_SpeechObjectToken {
DISPID_SOTId = 1,
DISPID_SOTDataKey,
DISPID_SOTCategory,
DISPID_SOTGetDescription,
DISPID_SOTSetId,
DISPID_SOTGetAttribute,
DISPID_SOTCreateInstance,
DISPID_SOTRemove,
DISPID_SOTGetStorageFileName,
DISPID_SOTRemoveStorageFileName,
DISPID_SOTIsUISupported,
DISPID_SOTDisplayUI,
DISPID_SOTMatchesAttributes
} DISPID_SpeechObjectToken;
typedef enum SpeechDataKeyLocation {
SDKLDefaultLocation = SPDKL_DefaultLocation,
SDKLCurrentUser = SPDKL_CurrentUser,
SDKLLocalMachine = SPDKL_LocalMachine,
SDKLCurrentConfig = SPDKL_CurrentConfig
} SpeechDataKeyLocation;
#define CLSCTXALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
typedef enum SpeechTokenContext {
STCInprocServer = CLSCTX_INPROC_SERVER,
STCInprocHandler = CLSCTX_INPROC_HANDLER,
STCLocalServer = CLSCTX_LOCAL_SERVER,
STCRemoteServer = CLSCTX_REMOTE_SERVER,
STCAll = CLSCTXALL
} SpeechTokenContext;
typedef enum SpeechTokenShellFolder {
STSF_AppData = 0x001a,
STSF_LocalAppData = 0x001c,
STSF_CommonAppData = 0x0023,
STSF_FlagCreate = 0x8000
} SpeechTokenShellFolder;
typedef [hidden] enum DISPID_SpeechObjectTokens {
DISPID_SOTsCount = 1,
DISPID_SOTsItem = DISPID_VALUE,
DISPID_SOTs_NewEnum = DISPID_NEWENUM
} DISPID_SpeechObjectTokens;
typedef [hidden] enum DISPID_SpeechObjectTokenCategory {
DISPID_SOTCId = 1,
DISPID_SOTCDefault,
DISPID_SOTCSetId,
DISPID_SOTCGetDataKey,
DISPID_SOTCEnumerateTokens,
} DISPID_SpeechObjectTokenCategory;
[object, uuid (CE17C09B-4efa-44d5-A4C9-59d9585ab0cd), dual, pointer_default (unique)]
interface ISpeechDataKey : IDispatch {
[id (DISPID_SDKSetBinaryValue)] HRESULT SetBinaryValue ([in]const BSTR ValueName,[in]VARIANT Value);
[id (DISPID_SDKGetBinaryValue)] HRESULT GetBinaryValue ([in]const BSTR ValueName,[out, retval]VARIANT *Value);
[id (DISPID_SDKSetStringValue)] HRESULT SetStringValue ([in]const BSTR ValueName,[in]const BSTR Value);
[id (DISPID_SDKGetStringValue)] HRESULT GetStringValue ([in]const BSTR ValueName,[out, retval]BSTR *Value);
[id (DISPID_SDKSetLongValue)] HRESULT SetLongValue ([in]const BSTR ValueName,[in]long Value);
[id (DISPID_SDKGetlongValue)] HRESULT GetLongValue ([in]const BSTR ValueName,[out, retval]long *Value);
[id (DISPID_SDKOpenKey)] HRESULT OpenKey ([in]const BSTR SubKeyName,[out, retval]ISpeechDataKey **SubKey);
[id (DISPID_SDKCreateKey)] HRESULT CreateKey ([in]const BSTR SubKeyName,[out, retval]ISpeechDataKey **SubKey);
[id (DISPID_SDKDeleteKey)] HRESULT DeleteKey ([in]const BSTR SubKeyName);
[id (DISPID_SDKDeleteValue)] HRESULT DeleteValue ([in]const BSTR ValueName);
[id (DISPID_SDKEnumKeys)] HRESULT EnumKeys ([in]long Index,[out, retval]BSTR *SubKeyName);
[id (DISPID_SDKEnumValues)] HRESULT EnumValues ([in]long Index,[out, retval]BSTR *ValueName);
};
[object, uuid (C74A3ADC-B727-4500-A84A-B526721C8B8C), dual, pointer_default (unique)]
interface ISpeechObjectToken : IDispatch {
[propget, id (DISPID_SOTId)] HRESULT Id ([out, retval]BSTR *ObjectId);
[propget, id (DISPID_SOTDataKey), hidden] HRESULT DataKey ([out, retval]ISpeechDataKey **DataKey);
[propget, id (DISPID_SOTCategory)] HRESULT Category ([out, retval]ISpeechObjectTokenCategory **Category);
[id (DISPID_SOTGetDescription)] HRESULT GetDescription ([in, defaultvalue (0)]long Locale,[out, retval]BSTR *Description);
[hidden, id (DISPID_SOTSetId)] HRESULT SetId ([in] BSTR Id,[in, defaultvalue (L"")] BSTR CategoryID,[in, defaultvalue (0)]VARIANT_BOOL CreateIfNotExist);
[id (DISPID_SOTGetAttribute)] HRESULT GetAttribute ([in] BSTR AttributeName,[out, retval]BSTR *AttributeValue);
[id (DISPID_SOTCreateInstance)] HRESULT CreateInstance ([in, defaultvalue (NULL)] IUnknown *pUnkOuter,[in, defaultvalue (STCAll)] SpeechTokenContext ClsContext,[out, retval]IUnknown **Object);
[hidden, id (DISPID_SOTRemove)] HRESULT Remove ([in]BSTR ObjectStorageCLSID);
[hidden, id (DISPID_SOTGetStorageFileName)] HRESULT GetStorageFileName ([in]BSTR ObjectStorageCLSID,[in]BSTR KeyName,[in]BSTR FileName,[in]SpeechTokenShellFolder Folder,[out, retval]BSTR *FilePath);
[hidden, id (DISPID_SOTRemoveStorageFileName)] HRESULT RemoveStorageFileName ([in]BSTR ObjectStorageCLSID,[in]BSTR KeyName,[in]VARIANT_BOOL DeleteFile);
[hidden, id (DISPID_SOTIsUISupported)] HRESULT IsUISupported ([in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData,[in, defaultvalue (NULL)]IUnknown *Object,[out, retval] VARIANT_BOOL *Supported);
[hidden, id (DISPID_SOTDisplayUI)] HRESULT DisplayUI ([in]long hWnd,[in]BSTR Title,[in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData,[in, defaultvalue (NULL)]IUnknown *Object);
[id (DISPID_SOTMatchesAttributes)] HRESULT MatchesAttributes ([in]BSTR Attributes,[out, retval] VARIANT_BOOL *Matches);
};
[object, uuid (9285b776-2e7b-4bc0-B53E-580eb6fa967f), dual, pointer_default (unique)]
interface ISpeechObjectTokens : IDispatch {
[propget, id (DISPID_SOTsCount)] HRESULT Count ([out, retval] long *Count);
[id (DISPID_VALUE)] HRESULT Item ([in] long Index,[out, retval]ISpeechObjectToken **Token);
[propget, restricted, id (DISPID_NEWENUM)] HRESULT _NewEnum ([out, retval] IUnknown **ppEnumVARIANT);
};
[object, uuid (CA7EAC50-2d01-4145-86d4-5ae7d70f4469), dual, pointer_default (unique)]
interface ISpeechObjectTokenCategory : IDispatch {
[propget, id (DISPID_SOTCId)] HRESULT Id ([out, retval] BSTR *Id);
[propput, id (DISPID_SOTCDefault)] HRESULT Default ([in] const BSTR TokenId);
[propget, id (DISPID_SOTCDefault)] HRESULT Default ([out, retval] BSTR *TokenId);
[id (DISPID_SOTCSetId)] HRESULT SetId ([in] const BSTR Id,[in, defaultvalue (0)]VARIANT_BOOL CreateIfNotExist);
[hidden, id (DISPID_SOTCGetDataKey)] HRESULT GetDataKey ([in, defaultvalue (SDKLDefaultLocation)]SpeechDataKeyLocation Location,[out, retval]ISpeechDataKey **DataKey);
[id (DISPID_SOTCEnumerateTokens)] HRESULT EnumerateTokens ([in, defaultvalue (L"")]BSTR RequiredAttributes,[in, defaultvalue (L"")]BSTR OptionalAttributes,[out, retval]ISpeechObjectTokens **Tokens);
};
typedef enum SpeechAudioFormatType {
SAFTDefault = -1,
SAFTNoAssignedFormat = 0,
SAFTText,
SAFTNonStandardFormat,
SAFTExtendedAudioFormat,
SAFT8kHz8BitMono,
SAFT8kHz8BitStereo,
SAFT8kHz16BitMono,
SAFT8kHz16BitStereo,
SAFT11kHz8BitMono,
SAFT11kHz8BitStereo,
SAFT11kHz16BitMono,
SAFT11kHz16BitStereo,
SAFT12kHz8BitMono,
SAFT12kHz8BitStereo,
SAFT12kHz16BitMono,
SAFT12kHz16BitStereo,
SAFT16kHz8BitMono,
SAFT16kHz8BitStereo,
SAFT16kHz16BitMono,
SAFT16kHz16BitStereo,
SAFT22kHz8BitMono,
SAFT22kHz8BitStereo,
SAFT22kHz16BitMono,
SAFT22kHz16BitStereo,
SAFT24kHz8BitMono,
SAFT24kHz8BitStereo,
SAFT24kHz16BitMono,
SAFT24kHz16BitStereo,
SAFT32kHz8BitMono,
SAFT32kHz8BitStereo,
SAFT32kHz16BitMono,
SAFT32kHz16BitStereo,
SAFT44kHz8BitMono,
SAFT44kHz8BitStereo,
SAFT44kHz16BitMono,
SAFT44kHz16BitStereo,
SAFT48kHz8BitMono,
SAFT48kHz8BitStereo,
SAFT48kHz16BitMono,
SAFT48kHz16BitStereo,
SAFTTrueSpeech_8kHz1BitMono,
SAFTCCITT_ALaw_8kHzMono,
SAFTCCITT_ALaw_8kHzStereo,
SAFTCCITT_ALaw_11kHzMono,
SAFTCCITT_ALaw_11kHzStereo,
SAFTCCITT_ALaw_22kHzMono,
SAFTCCITT_ALaw_22kHzStereo,
SAFTCCITT_ALaw_44kHzMono,
SAFTCCITT_ALaw_44kHzStereo,
SAFTCCITT_uLaw_8kHzMono,
SAFTCCITT_uLaw_8kHzStereo,
SAFTCCITT_uLaw_11kHzMono,
SAFTCCITT_uLaw_11kHzStereo,
SAFTCCITT_uLaw_22kHzMono,
SAFTCCITT_uLaw_22kHzStereo,
SAFTCCITT_uLaw_44kHzMono,
SAFTCCITT_uLaw_44kHzStereo,
SAFTADPCM_8kHzMono,
SAFTADPCM_8kHzStereo,
SAFTADPCM_11kHzMono,
SAFTADPCM_11kHzStereo,
SAFTADPCM_22kHzMono,
SAFTADPCM_22kHzStereo,
SAFTADPCM_44kHzMono,
SAFTADPCM_44kHzStereo,
SAFTGSM610_8kHzMono,
SAFTGSM610_11kHzMono,
SAFTGSM610_22kHzMono,
SAFTGSM610_44kHzMono,
} SpeechAudioFormatType;
typedef [hidden] enum DISPID_SpeechAudioFormat {
DISPID_SAFType = 1,
DISPID_SAFGuid,
DISPID_SAFGetWaveFormatEx,
DISPID_SAFSetWaveFormatEx
} DISPID_SpeechAudioFormat;
typedef [hidden] enum DISPID_SpeechBaseStream {
DISPID_SBSFormat = 1,
DISPID_SBSRead,
DISPID_SBSWrite,
DISPID_SBSSeek
} DISPID_SpeechBaseStream;
typedef enum SpeechStreamSeekPositionType {
SSSPTRelativeToStart = STREAM_SEEK_SET,
SSSPTRelativeToCurrentPosition = STREAM_SEEK_CUR,
SSSPTRelativeToEnd = STREAM_SEEK_END
} SpeechStreamSeekPositionType;
typedef [hidden] enum DISPID_SpeechAudio {
DISPID_SAStatus = 200,
DISPID_SABufferInfo,
DISPID_SADefaultFormat,
DISPID_SAVolume,
DISPID_SABufferNotifySize,
DISPID_SAEventHandle,
DISPID_SASetState
} DISPID_SpeechAudio;
typedef enum SpeechAudioState {
SASClosed = SPAS_CLOSED,
SASStop = SPAS_STOP,
SASPause = SPAS_PAUSE,
SASRun = SPAS_RUN
} SpeechAudioState;
typedef [hidden] enum DISPID_SpeechMMSysAudio {
DISPID_SMSADeviceId = 300,
DISPID_SMSALineId,
DISPID_SMSAMMHandle
} DISPID_SpeechMMSysAudio;
typedef [hidden] enum DISPID_SpeechFileStream {
DISPID_SFSOpen = 100,
DISPID_SFSClose
} DISPID_SpeechFileStream;
typedef enum SpeechStreamFileMode {
SSFMOpenForRead = SPFM_OPEN_READONLY,
SSFMOpenReadWrite = SPFM_OPEN_READWRITE,
SSFMCreate = SPFM_CREATE,
SSFMCreateForWrite = SPFM_CREATE_ALWAYS,
} SpeechStreamFileMode;
typedef [hidden] enum DISPID_SpeechCustomStream {
DISPID_SCSBaseStream = 100
} DISPID_SpeechCustomStream;
typedef [hidden] enum DISPID_SpeechMemoryStream {
DISPID_SMSSetData = 100,
DISPID_SMSGetData
} DISPID_SpeechMemoryStream;
typedef [hidden] enum DISPID_SpeechAudioStatus {
DISPID_SASFreeBufferSpace = 1,
DISPID_SASNonBlockingIO,
DISPID_SASState,
DISPID_SASCurrentSeekPosition,
DISPID_SASCurrentDevicePosition
} DISPID_SpeechAudioStatus;
typedef [hidden] enum DISPID_SpeechAudioBufferInfo {
DISPID_SABIMinNotification = 1,
DISPID_SABIBufferSize,
DISPID_SABIEventBias
} DISPID_SpeechAudioBufferInfo;
typedef [hidden] enum DISPID_SpeechWaveFormatEx {
DISPID_SWFEFormatTag = 1,
DISPID_SWFEChannels,
DISPID_SWFESamplesPerSec,
DISPID_SWFEAvgBytesPerSec,
DISPID_SWFEBlockAlign,
DISPID_SWFEBitsPerSample,
DISPID_SWFEExtraData
} DISPID_SpeechWaveFormatEx;
typedef [hidden] enum DISPID_SpeechVoice {
DISPID_SVStatus = 1,
DISPID_SVVoice,
DISPID_SVAudioOutput,
DISPID_SVAudioOutputStream,
DISPID_SVRate,
DISPID_SVVolume,
DISPID_SVAllowAudioOuputFormatChangesOnNextSet,
DISPID_SVEventInterests,
DISPID_SVPriority,
DISPID_SVAlertBoundary,
DISPID_SVSyncronousSpeakTimeout,
DISPID_SVSpeak,
DISPID_SVSpeakStream,
DISPID_SVPause,
DISPID_SVResume,
DISPID_SVSkip,
DISPID_SVGetVoices,
DISPID_SVGetAudioOutputs,
DISPID_SVWaitUntilDone,
DISPID_SVSpeakCompleteEvent,
DISPID_SVIsUISupported,
DISPID_SVDisplayUI
} DISPID_SpeechVoice;
typedef enum SpeechVoicePriority {
SVPNormal = SPVPRI_NORMAL,
SVPAlert = SPVPRI_ALERT,
SVPOver = SPVPRI_OVER
} SpeechVoicePriority;
typedef enum SpeechVoiceSpeakFlags {
SVSFDefault = SPF_DEFAULT,
SVSFlagsAsync = SPF_ASYNC,
SVSFPurgeBeforeSpeak = SPF_PURGEBEFORESPEAK,
SVSFIsFilename = SPF_IS_FILENAME,
SVSFIsXML = SPF_IS_XML,
SVSFIsNotXML = SPF_IS_NOT_XML,
SVSFPersistXML = SPF_PERSIST_XML,
SVSFNLPSpeakPunc = SPF_NLP_SPEAK_PUNC,
#if _SAPI_BLD_ >= 0x53
SVSFParseSapi = SPF_PARSE_SAPI,
SVSFParseSsml = SPF_PARSE_SSML,
SVSFParseAutodetect = SPF_PARSE_AUTODETECT,
#endif
SVSFNLPMask = SPF_NLP_MASK,
#if _SAPI_BLD_ >= 0x53
SVSFParseMask = SPF_PARSE_MASK,
#endif
SVSFVoiceMask = SPF_VOICE_MASK,
SVSFUnusedFlags = SPF_UNUSED_FLAGS,
} SpeechVoiceSpeakFlags;
typedef enum SpeechVoiceEvents {
SVEStartInputStream = 0x2,
SVEEndInputStream = 0x4,
SVEVoiceChange = 0x8,
SVEBookmark = 0x10,
SVEWordBoundary = 0x20,
SVEPhoneme = 0x40,
SVESentenceBoundary = 0x80,
SVEViseme = 0x100,
SVEAudioLevel = 0x200,
SVEPrivate = 0x8000,
SVEAllEvents = 0x83fe
} SpeechVoiceEvents;
typedef [hidden] enum DISPID_SpeechVoiceStatus {
DISPID_SVSCurrentStreamNumber = 1,
DISPID_SVSLastStreamNumberQueued,
DISPID_SVSLastResult,
DISPID_SVSRunningState,
DISPID_SVSInputWordPosition,
DISPID_SVSInputWordLength,
DISPID_SVSInputSentencePosition,
DISPID_SVSInputSentenceLength,
DISPID_SVSLastBookmark,
DISPID_SVSLastBookmarkId,
DISPID_SVSPhonemeId,
DISPID_SVSVisemeId
} DISPID_SpeechVoiceStatus;
typedef enum SpeechRunState {
SRSEDone = SPRS_DONE,
SRSEIsSpeaking = SPRS_IS_SPEAKING
} SpeechRunState;
[object, uuid (E6E9C590-3e18-40e3-8299-061f98bde7c7), dual, pointer_default (unique)]
interface ISpeechAudioFormat : IDispatch {
[propget, id (DISPID_SAFType)] HRESULT Type ([out, retval]SpeechAudioFormatType *AudioFormat);
[propput, id (DISPID_SAFType)] HRESULT Type ([in]SpeechAudioFormatType AudioFormat);
[propget, hidden, id (DISPID_SAFGuid)] HRESULT Guid ([out, retval]BSTR *Guid);
[propput, hidden, id (DISPID_SAFGuid)] HRESULT Guid ([in]BSTR Guid);
[hidden, id (DISPID_SAFGetWaveFormatEx)] HRESULT GetWaveFormatEx ([out, retval]ISpeechWaveFormatEx **SpeechWaveFormatEx);
[hidden, id (DISPID_SAFSetWaveFormatEx)] HRESULT SetWaveFormatEx ([in]ISpeechWaveFormatEx *SpeechWaveFormatEx);
}
[object, uuid (6450336f-7d49-4ced-8097-49d6dee37294), dual, pointer_default (unique)]
interface ISpeechBaseStream : IDispatch {
[propget, id (DISPID_SBSFormat)] HRESULT Format ([out, retval]ISpeechAudioFormat **AudioFormat);
[propputref, id (DISPID_SBSFormat)] HRESULT Format ([in]ISpeechAudioFormat *AudioFormat);
[id (DISPID_SBSRead)] HRESULT Read ([out]VARIANT *Buffer,[in]long NumberOfBytes,[out, retval]long *BytesRead);
[id (DISPID_SBSWrite)] HRESULT Write ([in]VARIANT Buffer,[out, retval]long *BytesWritten);
[id (DISPID_SBSSeek)] HRESULT Seek ([in]VARIANT Position,[in, defaultvalue (SSSPTRelativeToStart)]SpeechStreamSeekPositionType Origin,[out, retval]VARIANT *NewPosition);
};
[object, uuid (CFF8E175-019e-11d3-A08E-00c04f8ef9b5), dual, pointer_default (unique)]
interface ISpeechAudio : ISpeechBaseStream {
[propget, id (DISPID_SAStatus)] HRESULT Status ([out, retval]ISpeechAudioStatus **Status);
[propget, id (DISPID_SABufferInfo)] HRESULT BufferInfo ([out, retval]ISpeechAudioBufferInfo **BufferInfo);
[propget, id (DISPID_SADefaultFormat)] HRESULT DefaultFormat ([out, retval]ISpeechAudioFormat **StreamFormat);
[propget, id (DISPID_SAVolume)] HRESULT Volume ([out, retval]long *Volume);
[propput, id (DISPID_SAVolume)] HRESULT Volume ([in]long Volume);
[propget, id (DISPID_SABufferNotifySize)] HRESULT BufferNotifySize ([out, retval]long *BufferNotifySize);
[propput, id (DISPID_SABufferNotifySize)] HRESULT BufferNotifySize ([in]long BufferNotifySize);
[propget, hidden, id (DISPID_SAEventHandle)] HRESULT EventHandle ([out, retval]long *EventHandle);
[id (DISPID_SASetState), hidden] HRESULT SetState ([in] SpeechAudioState State);
};
[object, uuid (3c76af6d-1fd7-4831-81d1-3b71d5a13c44), dual, pointer_default (unique)]
interface ISpeechMMSysAudio : ISpeechAudio {
[propget, id (DISPID_SMSADeviceId)] HRESULT DeviceId ([out, retval] long *DeviceId);
[propput, id (DISPID_SMSADeviceId)] HRESULT DeviceId ([in] long DeviceId);
[propget, id (DISPID_SMSALineId)] HRESULT LineId ([out, retval] long *LineId);
[propput, id (DISPID_SMSALineId)] HRESULT LineId ([in] long LineId);
[propget, hidden, id (DISPID_SMSAMMHandle)] HRESULT MMHandle ([out, retval] long *Handle);
};
[object, uuid (AF67F125-AB39-4e93-B4A2-CC2E66E182A7), dual, pointer_default (unique)]
interface ISpeechFileStream : ISpeechBaseStream {
[id (DISPID_SFSOpen)] HRESULT Open ([in] BSTR FileName,[in, defaultvalue (SSFMOpenForRead)] SpeechStreamFileMode FileMode,[in, defaultvalue (0)]VARIANT_BOOL DoEvents);
[id (DISPID_SFSClose)] HRESULT Close (void);
};
[object, uuid (1a9e9f4f-104f-4db8-A115-EFD7FD0C97AE), dual, pointer_default (unique)]
interface ISpeechCustomStream : ISpeechBaseStream {
[propget, id (DISPID_SCSBaseStream)] HRESULT BaseStream ([out, retval] IUnknown **ppUnkStream);
[propputref, id (DISPID_SCSBaseStream)] HRESULT BaseStream ([in] IUnknown *pUnkStream);
};
[object, uuid (EEB14B68-808b-4abe-A5EA-B51DA7588008), dual, pointer_default (unique)]
interface ISpeechMemoryStream : ISpeechBaseStream {
[id (DISPID_SMSSetData)] HRESULT SetData ([in] VARIANT Data);
[id (DISPID_SMSGetData)] HRESULT GetData ([out, retval] VARIANT *pData);
};
[object, uuid (C62D9C91-7458-47f6-862d-1ef86fb0b278), dual, pointer_default (unique)]
interface ISpeechAudioStatus : IDispatch {
[propget, id (DISPID_SASFreeBufferSpace)] HRESULT FreeBufferSpace ([out, retval]long *FreeBufferSpace);
[propget, id (DISPID_SASNonBlockingIO)] HRESULT NonBlockingIO ([out, retval]long *NonBlockingIO);
[propget, id (DISPID_SASState)] HRESULT State ([out, retval] SpeechAudioState *State);
[propget, id (DISPID_SASCurrentSeekPosition)] HRESULT CurrentSeekPosition ([out, retval]VARIANT *CurrentSeekPosition);
[propget, id (DISPID_SASCurrentDevicePosition)] HRESULT CurrentDevicePosition ([out, retval]VARIANT *CurrentDevicePosition);
};
[object, uuid (11b103d8-1142-4edf-A093-82fb3915f8cc), dual, pointer_default (unique)]
interface ISpeechAudioBufferInfo : IDispatch {
[propget, id (DISPID_SABIMinNotification)] HRESULT MinNotification ([out, retval]long *MinNotification);
[propput, id (DISPID_SABIMinNotification)] HRESULT MinNotification ([in]long MinNotification);
[propget, id (DISPID_SABIBufferSize)] HRESULT BufferSize ([out, retval]long *BufferSize);
[propput, id (DISPID_SABIBufferSize)] HRESULT BufferSize ([in]long BufferSize);
[propget, id (DISPID_SABIEventBias)] HRESULT EventBias ([out, retval]long *EventBias);
[propput, id (DISPID_SABIEventBias)] HRESULT EventBias ([in]long EventBias);
}
[object, uuid (7a1ef0d5-1581-4741-88e4-209a49f11a10), dual, pointer_default (unique)]
interface ISpeechWaveFormatEx : IDispatch {
[propget, id (DISPID_SWFEFormatTag)] HRESULT FormatTag ([out, retval]short *FormatTag);
[propput, id (DISPID_SWFEFormatTag)] HRESULT FormatTag ([in]short FormatTag);
[propget, id (DISPID_SWFEChannels)] HRESULT Channels ([out, retval]short *Channels);
[propput, id (DISPID_SWFEChannels)] HRESULT Channels ([in]short Channels);
[propget, id (DISPID_SWFESamplesPerSec)] HRESULT SamplesPerSec ([out, retval]long *SamplesPerSec);
[propput, id (DISPID_SWFESamplesPerSec)] HRESULT SamplesPerSec ([in]long SamplesPerSec);
[propget, id (DISPID_SWFEAvgBytesPerSec)] HRESULT AvgBytesPerSec ([out, retval]long *AvgBytesPerSec);
[propput, id (DISPID_SWFEAvgBytesPerSec)] HRESULT AvgBytesPerSec ([in]long AvgBytesPerSec);
[propget, id (DISPID_SWFEBlockAlign)] HRESULT BlockAlign ([out, retval]short *BlockAlign);
[propput, id (DISPID_SWFEBlockAlign)] HRESULT BlockAlign ([in]short BlockAlign);
[propget, id (DISPID_SWFEBitsPerSample)] HRESULT BitsPerSample ([out, retval]short *BitsPerSample);
[propput, id (DISPID_SWFEBitsPerSample)] HRESULT BitsPerSample ([in]short BitsPerSample);
[propget, id (DISPID_SWFEExtraData)] HRESULT ExtraData ([out, retval]VARIANT *ExtraData);
[propput, id (DISPID_SWFEExtraData)] HRESULT ExtraData ([in]VARIANT ExtraData);
}
[object, uuid (269316d8-57bd-11d2-9eee-00c04f797396), dual, pointer_default (unique)]
interface ISpeechVoice : IDispatch {
[propget, id (DISPID_SVStatus)] HRESULT Status ([out, retval] ISpeechVoiceStatus **Status);
[propget, id (DISPID_SVVoice)] HRESULT Voice ([out, retval] ISpeechObjectToken **Voice);
[propputref, id (DISPID_SVVoice)] HRESULT Voice ([in]ISpeechObjectToken *Voice);
[propget, id (DISPID_SVAudioOutput)] HRESULT AudioOutput ([out, retval]ISpeechObjectToken **AudioOutput);
[propputref, id (DISPID_SVAudioOutput)] HRESULT AudioOutput ([in]ISpeechObjectToken *AudioOutput);
[propget, id (DISPID_SVAudioOutputStream)] HRESULT AudioOutputStream ([out, retval]ISpeechBaseStream **AudioOutputStream);
[propputref, id (DISPID_SVAudioOutputStream)] HRESULT AudioOutputStream ([in]ISpeechBaseStream *AudioOutputStream);
[propget, id (DISPID_SVRate)] HRESULT Rate ([out, retval] long *Rate);
[propput, id (DISPID_SVRate)] HRESULT Rate ([in] long Rate);
[propget, id (DISPID_SVVolume)] HRESULT Volume ([out, retval] long *Volume);
[propput, id (DISPID_SVVolume)] HRESULT Volume ([in] long Volume);
[propput, hidden, id (DISPID_SVAllowAudioOuputFormatChangesOnNextSet)] HRESULT AllowAudioOutputFormatChangesOnNextSet ([in] VARIANT_BOOL Allow);
[propget, hidden, id (DISPID_SVAllowAudioOuputFormatChangesOnNextSet)] HRESULT AllowAudioOutputFormatChangesOnNextSet ([out, retval] VARIANT_BOOL *Allow);
[propget, id (DISPID_SVEventInterests)] HRESULT EventInterests ([out, retval] SpeechVoiceEvents *EventInterestFlags);
[propput, id (DISPID_SVEventInterests)] HRESULT EventInterests ([in] SpeechVoiceEvents EventInterestFlags);
[propput, id (DISPID_SVPriority)] HRESULT Priority ([in] SpeechVoicePriority Priority);
[propget, id (DISPID_SVPriority)] HRESULT Priority ([out, retval] SpeechVoicePriority *Priority);
[propput, id (DISPID_SVAlertBoundary)] HRESULT AlertBoundary ([in] SpeechVoiceEvents Boundary);
[propget, id (DISPID_SVAlertBoundary)] HRESULT AlertBoundary ([out, retval] SpeechVoiceEvents *Boundary);
[propput, id (DISPID_SVSyncronousSpeakTimeout)] HRESULT SynchronousSpeakTimeout ([in] long msTimeout);
[propget, id (DISPID_SVSyncronousSpeakTimeout)] HRESULT SynchronousSpeakTimeout ([out, retval] long *msTimeout);
[id (DISPID_SVSpeak)] HRESULT Speak ([in] BSTR Text,[in, defaultvalue (SPF_DEFAULT)] SpeechVoiceSpeakFlags Flags,[out, retval]long *StreamNumber);
[id (DISPID_SVSpeakStream)] HRESULT SpeakStream ([in] ISpeechBaseStream *Stream,[in, defaultvalue (SPF_DEFAULT)] SpeechVoiceSpeakFlags Flags,[out, retval]long *StreamNumber);
[id (DISPID_SVPause)] HRESULT Pause (void);
[id (DISPID_SVResume)] HRESULT Resume (void);
[id (DISPID_SVSkip)] HRESULT Skip ([in]const BSTR Type,[in]long NumItems,[out, retval]long *NumSkipped);
[id (DISPID_SVGetVoices)] HRESULT GetVoices ([in, defaultvalue (L"")]BSTR RequiredAttributes,[in, defaultvalue (L"")]BSTR OptionalAttributes,[out, retval]ISpeechObjectTokens **ObjectTokens);
[id (DISPID_SVGetAudioOutputs)] HRESULT GetAudioOutputs ([in, defaultvalue (L"")]BSTR RequiredAttributes,[in, defaultvalue (L"")]BSTR OptionalAttributes,[out, retval]ISpeechObjectTokens **ObjectTokens);
[id (DISPID_SVWaitUntilDone)] HRESULT WaitUntilDone ([in]long msTimeout,[out, retval]VARIANT_BOOL *Done);
[hidden, id (DISPID_SVSpeakCompleteEvent)] HRESULT SpeakCompleteEvent ([out, retval]long *Handle);
[id (DISPID_SVIsUISupported)] HRESULT IsUISupported ([in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData,[out, retval] VARIANT_BOOL *Supported);
[id (DISPID_SVDisplayUI)] HRESULT DisplayUI ([in]long hWndParent,[in]BSTR Title,[in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData);
};
[object, uuid (8be47b07-57f6-11d2-9eee-00c04f797396), dual, pointer_default (unique)]
interface ISpeechVoiceStatus : IDispatch {
[propget, id (DISPID_SVSCurrentStreamNumber)] HRESULT CurrentStreamNumber ([out, retval] long *StreamNumber);
[propget, id (DISPID_SVSLastStreamNumberQueued)] HRESULT LastStreamNumberQueued ([out, retval] long *StreamNumber);
[propget, id (DISPID_SVSLastResult)] HRESULT LastHResult ([out, retval]long *HResult);
[propget, id (DISPID_SVSRunningState)] HRESULT RunningState ([out, retval] SpeechRunState *State);
[propget, id (DISPID_SVSInputWordPosition)] HRESULT InputWordPosition ([out, retval] long *Position);
[propget, id (DISPID_SVSInputWordLength)] HRESULT InputWordLength ([out, retval] long *Length);
[propget, id (DISPID_SVSInputSentencePosition)] HRESULT InputSentencePosition ([out, retval] long *Position);
[propget, id (DISPID_SVSInputSentenceLength)] HRESULT InputSentenceLength ([out, retval] long *Length);
[propget, id (DISPID_SVSLastBookmark)] HRESULT LastBookmark ([out, retval] BSTR *Bookmark);
[propget, id (DISPID_SVSLastBookmarkId), hidden] HRESULT LastBookmarkId ([out, retval] long *BookmarkId);
[propget, id (DISPID_SVSPhonemeId)] HRESULT PhonemeId ([out, retval] short *PhoneId);
[propget, id (DISPID_SVSVisemeId)] HRESULT VisemeId ([out, retval] short *VisemeId);
};
typedef enum SpeechVisemeType {
SVP_0 = 0,
SVP_1,
SVP_2,
SVP_3,
SVP_4,
SVP_5,
SVP_6,
SVP_7,
SVP_8,
SVP_9,
SVP_10,
SVP_11,
SVP_12,
SVP_13,
SVP_14,
SVP_15,
SVP_16,
SVP_17,
SVP_18,
SVP_19,
SVP_20,
SVP_21,
} SpeechVisemeType;
typedef enum SpeechVisemeFeature {
SVF_None = 0,
SVF_Stressed = SPVFEATURE_STRESSED,
SVF_Emphasis = SPVFEATURE_EMPHASIS
} SpeechVisemeFeature;
typedef [hidden] enum DISPID_SpeechVoiceEvent {
DISPID_SVEStreamStart = 1,
DISPID_SVEStreamEnd,
DISPID_SVEVoiceChange,
DISPID_SVEBookmark,
DISPID_SVEWord,
DISPID_SVEPhoneme,
DISPID_SVESentenceBoundary,
DISPID_SVEViseme,
DISPID_SVEAudioLevel,
DISPID_SVEEnginePrivate
} DISPID_SpeechVoiceEvent;
typedef [hidden] enum DISPID_SpeechRecognizer {
DISPID_SRRecognizer = 1,
DISPID_SRAllowAudioInputFormatChangesOnNextSet,
DISPID_SRAudioInput,
DISPID_SRAudioInputStream,
DISPID_SRIsShared,
DISPID_SRState,
DISPID_SRStatus,
DISPID_SRProfile,
DISPID_SREmulateRecognition,
DISPID_SRCreateRecoContext,
DISPID_SRGetFormat,
DISPID_SRSetPropertyNumber,
DISPID_SRGetPropertyNumber,
DISPID_SRSetPropertyString,
DISPID_SRGetPropertyString,
DISPID_SRIsUISupported,
DISPID_SRDisplayUI,
DISPID_SRGetRecognizers,
DISPID_SVGetAudioInputs,
DISPID_SVGetProfiles
} DISPID_SpeechRecognizer;
typedef enum SpeechRecognizerState {
SRSInactive = SPRST_INACTIVE,
SRSActive = SPRST_ACTIVE,
SRSActiveAlways = SPRST_ACTIVE_ALWAYS,
SRSInactiveWithPurge = SPRST_INACTIVE_WITH_PURGE,
} SpeechRecognizerState;
typedef enum SpeechDisplayAttributes {
SDA_No_Trailing_Space = 0,
SDA_One_Trailing_Space = SPAF_ONE_TRAILING_SPACE,
SDA_Two_Trailing_Spaces = SPAF_TWO_TRAILING_SPACES,
SDA_Consume_Leading_Spaces = SPAF_CONSUME_LEADING_SPACES
} SpeechDisplayAttributes;
typedef enum SpeechFormatType {
SFTInput = SPWF_INPUT,
SFTSREngine = SPWF_SRENGINE
} SpeechFormatType;
typedef [hidden] enum DISPID_SpeechRecognizerStatus {
DISPID_SRSAudioStatus = 1,
DISPID_SRSCurrentStreamPosition,
DISPID_SRSCurrentStreamNumber,
DISPID_SRSNumberOfActiveRules,
DISPID_SRSClsidEngine,
DISPID_SRSSupportedLanguages
} DISPID_SpeechRecognizerStatus;
typedef [hidden] enum DISPID_SpeechRecoContext {
DISPID_SRCRecognizer = 1,
DISPID_SRCAudioInInterferenceStatus,
DISPID_SRCRequestedUIType,
DISPID_SRCVoice,
DISPID_SRAllowVoiceFormatMatchingOnNextSet,
DISPID_SRCVoicePurgeEvent,
DISPID_SRCEventInterests,
DISPID_SRCCmdMaxAlternates,
DISPID_SRCState,
DISPID_SRCRetainedAudio,
DISPID_SRCRetainedAudioFormat,
DISPID_SRCPause,
DISPID_SRCResume,
DISPID_SRCCreateGrammar,
DISPID_SRCCreateResultFromMemory,
DISPID_SRCBookmark,
DISPID_SRCSetAdaptationData
} DISPID_SpeechRecoContext;
typedef enum SpeechRetainedAudioOptions {
SRAONone = SPAO_NONE,
SRAORetainAudio = SPAO_RETAIN_AUDIO
} SpeechRetainedAudioOptions;
typedef enum SpeechBookmarkOptions {
SBONone = SPBO_NONE,
SBOPause = SPBO_PAUSE
} SpeechBookmarkOptions;
typedef enum SpeechInterference {
SINone = SPINTERFERENCE_NONE,
SINoise = SPINTERFERENCE_NOISE,
SINoSignal = SPINTERFERENCE_NOSIGNAL,
SITooLoud = SPINTERFERENCE_TOOLOUD,
SITooQuiet = SPINTERFERENCE_TOOQUIET,
SITooFast = SPINTERFERENCE_TOOFAST,
SITooSlow = SPINTERFERENCE_TOOSLOW
} SpeechInterference;
typedef enum SpeechRecoEvents {
SREStreamEnd = 0x1,
SRESoundStart = 0x2,
SRESoundEnd = 0x4,
SREPhraseStart = 0x8,
SRERecognition = 0x10,
SREHypothesis = 0x20,
SREBookmark = 0x40,
SREPropertyNumChange = 0x80,
SREPropertyStringChange = 0x100,
SREFalseRecognition = 0x200,
SREInterference = 0x400,
SRERequestUI = 0x800,
SREStateChange = 0x1000,
SREAdaptation = 0x2000,
SREStreamStart = 0x4000,
SRERecoOtherContext = 0x8000,
SREAudioLevel = 0x10000,
SREPrivate = 0x40000,
SREAllEvents = 0x5ffff
} SpeechRecoEvents;
typedef enum SpeechRecoContextState {
SRCS_Disabled = SPCS_DISABLED,
SRCS_Enabled = SPCS_ENABLED
} SpeechRecoContextState;
typedef [hidden] enum DISPIDSPRG {
DISPID_SRGId = 1,
DISPID_SRGRecoContext,
DISPID_SRGState,
DISPID_SRGRules,
DISPID_SRGReset,
DISPID_SRGCommit,
DISPID_SRGCmdLoadFromFile,
DISPID_SRGCmdLoadFromObject,
DISPID_SRGCmdLoadFromResource,
DISPID_SRGCmdLoadFromMemory,
DISPID_SRGCmdLoadFromProprietaryGrammar,
DISPID_SRGCmdSetRuleState,
DISPID_SRGCmdSetRuleIdState,
DISPID_SRGDictationLoad,
DISPID_SRGDictationUnload,
DISPID_SRGDictationSetState,
DISPID_SRGSetWordSequenceData,
DISPID_SRGSetTextSelection,
DISPID_SRGIsPronounceable
} DISPIDSPRG;
typedef enum SpeechLoadOption {
SLOStatic = SPLO_STATIC,
SLODynamic = SPLO_DYNAMIC
} SpeechLoadOption;
typedef enum SpeechWordPronounceable {
SWPUnknownWordUnpronounceable = SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE,
SWPUnknownWordPronounceable = SPWP_UNKNOWN_WORD_PRONOUNCEABLE,
SWPKnownWordPronounceable = SPWP_KNOWN_WORD_PRONOUNCEABLE
} SpeechWordPronounceable;
typedef enum SpeechGrammarState {
SGSEnabled = SPGS_ENABLED,
SGSDisabled = SPGS_DISABLED,
SGSExclusive = SPGS_EXCLUSIVE,
} SpeechGrammarState;
typedef enum SpeechRuleState {
SGDSInactive = SPRS_INACTIVE,
SGDSActive = SPRS_ACTIVE,
SGDSActiveWithAutoPause = SPRS_ACTIVE_WITH_AUTO_PAUSE,
#if _SAPI_BLD_ >= 0x053
SGDSActiveUserDelimited = SPRS_ACTIVE_USER_DELIMITED
#endif
} SpeechRuleState;
typedef enum SpeechRuleAttributes {
SRATopLevel = SPRAF_TopLevel,
SRADefaultToActive = SPRAF_Active,
SRAExport = SPRAF_Export,
SRAImport = SPRAF_Import,
SRAInterpreter = SPRAF_Interpreter,
SRADynamic = SPRAF_Dynamic,
#if _SAPI_BLD_ >= 0x053
SRARoot = SPRAF_Root
#endif
} SpeechRuleAttributes;
typedef enum SpeechGrammarWordType {
SGDisplay = SPWT_DISPLAY,
SGLexical = SPWT_LEXICAL,
SGPronounciation = SPWT_PRONUNCIATION,
#if _SAPI_BLD_ >= 0x053
SGLexicalNoSpecialChars = SPWT_LEXICAL_NO_SPECIAL_CHARS
#endif
} SpeechGrammarWordType;
typedef [hidden] enum DISPID_SpeechRecoContextEvents {
DISPID_SRCEStartStream = 1,
DISPID_SRCEEndStream,
DISPID_SRCEBookmark,
DISPID_SRCESoundStart,
DISPID_SRCESoundEnd,
DISPID_SRCEPhraseStart,
DISPID_SRCERecognition,
DISPID_SRCEHypothesis,
DISPID_SRCEPropertyNumberChange,
DISPID_SRCEPropertyStringChange,
DISPID_SRCEFalseRecognition,
DISPID_SRCEInterference,
DISPID_SRCERequestUI,
DISPID_SRCERecognizerStateChange,
DISPID_SRCEAdaptation,
DISPID_SRCERecognitionForOtherContext,
DISPID_SRCEAudioLevel,
DISPID_SRCEEnginePrivate
} DISPID_SpeechRecoContextEvents;
typedef enum SpeechRecognitionType {
SRTStandard = 0,
SRTAutopause = SPREF_AutoPause,
SRTEmulated = SPREF_Emulated
#if _SAPI_BLD_ >= 0x053
,
SRTSMLTimeout = SPREF_SMLTimeout,
SRTExtendableParse = SPREF_ExtendableParse,
SRTReSent = SPREF_ReSent
#endif
} SpeechRecognitionType;
typedef [hidden] enum DISPID_SpeechGrammarRule {
DISPID_SGRAttributes = 1,
DISPID_SGRInitialState,
DISPID_SGRName,
DISPID_SGRId,
DISPID_SGRClear,
DISPID_SGRAddResource,
DISPID_SGRAddState
} DISPID_SpeechGrammarRule;
typedef [hidden] enum DISPID_SpeechGrammarRules {
DISPID_SGRsCount = 1,
DISPID_SGRsDynamic,
DISPID_SGRsAdd,
DISPID_SGRsCommit,
DISPID_SGRsCommitAndSave,
DISPID_SGRsFindRule,
DISPID_SGRsItem = DISPID_VALUE,
DISPID_SGRs_NewEnum = DISPID_NEWENUM
} DISPID_SpeechGrammarRules;