| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687 |
- /*=========================================================================*/
- /* */
- /* eci.h */
- /* */
- /* Licensed Materials - Property of IBM */
- /* (C) Copyright IBM Corp. 1998, 2002 All Rights Reserved. */
- /* US Government Users Restricted Rights - Use, duplication or disclosure */
- /* restricted by GSA ADP Schedule Contract with IBM Corp. */
- /* */
- /* The following IBM source code is provided to assist you in your */
- /* development. You may use this code only in accordance with the */
- /* IBM License Agreement. */
- /* */
- /* This copyright statement may not be removed. */
- /* */
- /*=========================================================================*/
- #ifndef __ECI_H
- #define __ECI_H
- #ifndef MOTIF
- typedef int Boolean;
- #endif
- #define ECITrue 1
- #define ECIFalse 0
- #ifndef ECIFNDECLARE
- typedef signed long ECIint32;
- #ifdef _MSC_VER
- #ifdef _WIN32_WCE
- typedef char ECIsystemChar;
- #define ECIFNDECLARE __stdcall
- #elif defined _WIN32
- #include <tchar.h>
- typedef _TCHAR ECIsystemChar;
- #define ECIFNDECLARE __stdcall
- #endif
- #elif defined __TURBOC__
- #ifdef __WIN32__
- #include <tchar.h>
- #define ECIFNDECLARE __stdcall
- typedef _TCHAR ECIsystemChar;
- #endif
- #else
- #define ECIFNDECLARE
- typedef char ECIsystemChar;
- #endif
- #endif
- #ifndef NULL_ECI_HAND
- #define NULL_ECI_HAND 0
- #endif
- #define ECI_PRESET_VOICES 8
- #define ECI_USER_DEFINED_VOICES 8
- #define ECI_VOICE_NAME_LENGTH 30
- #define ECI_NOERROR 0x00000000
- #define ECI_SYSTEMERROR 0x00000001
- #define ECI_MEMORYERROR 0x00000002
- #define ECI_MODULELOADERROR 0x00000004
- #define ECI_DELTAERROR 0x00000008
- #define ECI_SYNTHERROR 0x00000010
- #define ECI_DEVICEERROR 0x00000020
- #define ECI_DICTERROR 0x00000040
- #define ECI_PARAMETERERROR 0x00000080
- #define ECI_SYNTHESIZINGERROR 0x00000100
- #define ECI_DEVICEBUSY 0x00000200
- #define ECI_SYNTHESISPAUSED 0x00000400
- #define ECI_REENTRANTCALL 0x00000800
- #define ECI_ROMANIZERERROR 0x00001000
- #define ECI_SYNTHESIZING 0x00002000
- #define eciPhonemeLength (4)
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef void* ECIHand;
- typedef const void* ECIInputText;
- enum ECIParam {
- eciSynthMode,
- eciInputType,
- eciTextMode,
- eciDictionary,
- eciSampleRate = 5,
- eciWantPhonemeIndices = 7,
- eciRealWorldUnits,
- eciLanguageDialect,
- eciNumberMode,
- eciWantWordIndex = 12,
- eciNumDeviceBlocks,
- eciSizeDeviceBlocks,
- eciNumPrerollDeviceBlocks,
- eciSizePrerollDeviceBlocks,
- eciNumParams
- };
- enum ECIVoiceParam {
- eciGender,
- eciHeadSize,
- eciPitchBaseline,
- eciPitchFluctuation,
- eciRoughness,
- eciBreathiness,
- eciSpeed,
- eciVolume,
- eciNumVoiceParams
- };
- enum ECIDictError {
- DictNoError,
- DictFileNotFound,
- DictOutOfMemory,
- DictInternalError,
- DictNoEntry,
- DictErrLookUpKey,
- DictAccessError,
- DictInvalidVolume
- };
- typedef void* ECIDictHand;
- #define NULL_DICT_HAND 0
- enum ECIDictVolume {
- eciMainDict = 0,
- eciRootDict = 1,
- eciAbbvDict = 2,
- eciMainDictExt = 3
- };
- enum ECILanguageDialect {
- NODEFINEDCODESET = 0x00000000,
- eciGeneralAmericanEnglish = 0x00010000,
- eciBritishEnglish = 0x00010001,
- eciCastilianSpanish = 0x00020000,
- eciMexicanSpanish = 0x00020001,
- eciStandardFrench = 0x00030000,
- eciCanadianFrench = 0x00030001,
- eciStandardGerman = 0x00040000,
- eciStandardItalian = 0x00050000,
- eciMandarinChinese = 0x00060000,
- eciMandarinChineseGB = eciMandarinChinese,
- eciMandarinChinesePinYin = 0x00060100,
- eciMandarinChineseUCS = 0x00060800,
- eciTaiwaneseMandarin = 0x00060001,
- eciTaiwaneseMandarinBig5 = eciTaiwaneseMandarin,
- eciTaiwaneseMandarinZhuYin = 0x00060101,
- eciTaiwaneseMandarinPinYin = 0x00060201,
- eciTaiwaneseMandarinUCS = 0x00060801,
- eciBrazilianPortuguese = 0x00070000,
- eciStandardJapanese = 0x00080000,
- eciStandardJapaneseSJIS = eciStandardJapanese,
- eciStandardJapaneseUCS = 0x00080800,
- eciStandardFinnish = 0x00090000,
- eciStandardKorean = 0x000A0000,
- eciStandardKoreanUHC = eciStandardKorean,
- eciStandardKoreanUCS = 0x000A0800,
- eciStandardCantonese = 0x000B0000,
- eciStandardCantoneseGB = eciStandardCantonese,
- eciStandardCantoneseUCS = 0x000B0800,
- eciHongKongCantonese = 0x000B0001,
- eciHongKongCantoneseBig5 = eciHongKongCantonese,
- eciHongKongCantoneseUCS = 0x000B0801,
- eciStandardDutch = 0x000C0000,
- eciStandardNorwegian = 0x000D0000,
- eciStandardSwedish = 0x000E0000,
- eciStandardDanish = 0x000F0000
- };
- enum ECIPartOfSpeech {
- eciUndefinedPOS = 0,
- eciFutsuuMeishi = 1,
- eciKoyuuMeishi,
- eciSahenMeishi,
- eciMingCi
- };
- #if defined(WIN32)
- #pragma pack(push, 1)
- #elif defined(UNDER_CE) && (defined(MIPS) || defined(SH3))
- #pragma pack(push, 4)
- #endif
- typedef struct {
- union {
- unsigned char sz[eciPhonemeLength+1];
- unsigned short wsz[eciPhonemeLength+1];
- } phoneme;
- enum ECILanguageDialect eciLanguageDialect;
- unsigned char mouthHeight;
- unsigned char mouthWidth;
- unsigned char mouthUpturn;
- unsigned char jawOpen;
- unsigned char teethUpperVisible;
- unsigned char teethLowerVisible;
- unsigned char tonguePosn;
- unsigned char lipTension;
- } ECIMouthData;
- #if defined(WIN32) || ( defined(UNDER_CE) && (defined(MIPS) || defined(SH3)) )
- #pragma pack(pop)
- #endif
- enum ECIMessage {
- eciWaveformBuffer, eciPhonemeBuffer, eciIndexReply, eciPhonemeIndexReply, eciWordIndexReply
- };
- enum ECICallbackReturn {
- eciDataNotProcessed, eciDataProcessed, eciDataAbort
- };
- typedef enum ECICallbackReturn (*ECICallback)(ECIHand hEngine, enum ECIMessage Msg, long lParam, void *pData);
- #if defined(_WIN32) || defined(_Windows)
- enum ECIDialogBox {
- eciGeneralDB,
- eciAboutDB,
- eciVoicesDB,
- eciReadingDB,
- eciMainDictionaryDB,
- eciRootDictionaryDB,
- eciNumDialogBoxes
- };
- #endif
- #ifdef __cplusplus
- }
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- ECIHand ECIFNDECLARE eciNew(void);
- ECIHand ECIFNDECLARE eciNewEx(enum ECILanguageDialect Value);
- int ECIFNDECLARE eciGetAvailableLanguages(enum ECILanguageDialect *aLanguages, int *nLanguages);
- ECIHand ECIFNDECLARE eciDelete(ECIHand hEngine);
- Boolean ECIFNDECLARE eciReset(ECIHand hEngine);
- Boolean ECIFNDECLARE eciIsBeingReentered(ECIHand hEngine);
- void ECIFNDECLARE eciVersion(char *pBuffer);
- int ECIFNDECLARE eciProgStatus(ECIHand hEngine);
- void ECIFNDECLARE eciErrorMessage(ECIHand hEngine, void* buffer);
- void ECIFNDECLARE eciClearErrors(ECIHand hEngine);
- Boolean ECIFNDECLARE eciTestPhrase(ECIHand hEngine);
- Boolean ECIFNDECLARE eciSpeakText(ECIInputText pText, Boolean bAnnotationsInTextPhrase);
- Boolean ECIFNDECLARE eciSpeakTextEx(ECIInputText pText, Boolean bAnnotationsInTextPhrase, enum ECILanguageDialect Value);
- int ECIFNDECLARE eciGetParam(ECIHand hEngine, enum ECIParam Param);
- int ECIFNDECLARE eciSetParam(ECIHand hEngine, enum ECIParam Param, int iValue);
- int ECIFNDECLARE eciGetDefaultParam(enum ECIParam parameter);
- int ECIFNDECLARE eciSetDefaultParam(enum ECIParam parameter, int value);
- Boolean ECIFNDECLARE eciCopyVoice(ECIHand hEngine, int iVoiceFrom, int iVoiceTo);
- Boolean ECIFNDECLARE eciGetVoiceName(ECIHand hEngine, int iVoice, void *pBuffer);
- Boolean ECIFNDECLARE eciSetVoiceName(ECIHand hEngine, int iVoice, const void *pBuffer);
- int ECIFNDECLARE eciGetVoiceParam(ECIHand hEngine, int iVoice, enum ECIVoiceParam Param);
- int ECIFNDECLARE eciSetVoiceParam(ECIHand hEngine, int iVoice,
- enum ECIVoiceParam Param, int iValue);
- Boolean ECIFNDECLARE eciAddText(ECIHand hEngine, ECIInputText pText);
- Boolean ECIFNDECLARE eciInsertIndex(ECIHand hEngine, int iIndex);
- Boolean ECIFNDECLARE eciSynthesize(ECIHand hEngine);
- Boolean ECIFNDECLARE eciSynthesizeFile(ECIHand hEngine, const void *pFilename);
- Boolean ECIFNDECLARE eciClearInput(ECIHand hEngine);
- Boolean ECIFNDECLARE eciGeneratePhonemes(ECIHand hEngine, int iSize, void *pBuffer);
- int ECIFNDECLARE eciGetIndex(ECIHand hEngine);
- Boolean ECIFNDECLARE eciStop(ECIHand hEngine);
- Boolean ECIFNDECLARE eciSpeaking(ECIHand hEngine);
- Boolean ECIFNDECLARE eciSynchronize(ECIHand hEngine);
- Boolean ECIFNDECLARE eciSetOutputBuffer(ECIHand hEngine, int iSize, short *psBuffer);
- Boolean ECIFNDECLARE eciSetOutputFilename(ECIHand hEngine, const void *pFilename);
- Boolean ECIFNDECLARE eciSetOutputDevice(ECIHand hEngine, int iDevNum);
- Boolean ECIFNDECLARE eciPause(ECIHand hEngine, Boolean On);
- void ECIFNDECLARE eciRegisterCallback(ECIHand hEngine, ECICallback Callback, void *pData);
- ECIDictHand ECIFNDECLARE eciNewDict(ECIHand hEngine);
- ECIDictHand ECIFNDECLARE eciGetDict(ECIHand hEngine);
- enum ECIDictError ECIFNDECLARE eciSetDict(ECIHand hEngine, ECIDictHand hDict);
- ECIDictHand ECIFNDECLARE eciDeleteDict(ECIHand hEngine, ECIDictHand hDict);
- enum ECIDictError ECIFNDECLARE eciLoadDict(ECIHand hEngine, ECIDictHand hDict, enum ECIDictVolume DictVol, ECIInputText pFilename);
- enum ECIDictError ECIFNDECLARE eciSaveDict(ECIHand hEngine, ECIDictHand hDict, enum ECIDictVolume DictVol, ECIInputText pFilename);
- enum ECIDictError ECIFNDECLARE eciUpdateDict(ECIHand hEngine, ECIDictHand hDict,
- enum ECIDictVolume DictVol, ECIInputText pKey, ECIInputText pTranslationValue);
- enum ECIDictError ECIFNDECLARE eciDictFindFirst(ECIHand hEngine,
- ECIDictHand hDict, enum ECIDictVolume DictVol,
- ECIInputText *ppKey, ECIInputText *ppTranslationValue);
- enum ECIDictError ECIFNDECLARE eciDictFindNext(ECIHand hEngine,
- ECIDictHand hDict, enum ECIDictVolume DictVol,
- ECIInputText *ppKey, ECIInputText *ppTranslationValue);
- const char *ECIFNDECLARE eciDictLookup(ECIHand hEngine,
- ECIDictHand hDict, enum ECIDictVolume DictVol,
- ECIInputText pKey);
- enum ECIDictError ECIFNDECLARE eciUpdateDictA(ECIHand hEngine,
- ECIDictHand hDict, enum ECIDictVolume DictVol,
- ECIInputText pKey, ECIInputText pTranslationValue, enum ECIPartOfSpeech PartOfSpeech);
- enum ECIDictError ECIFNDECLARE eciDictFindFirstA(ECIHand hEngine,
- ECIDictHand hDict, enum ECIDictVolume DictVol,
- ECIInputText *ppKey, ECIInputText *ppTranslationValue, enum ECIPartOfSpeech *pPartOfSpeech);
- enum ECIDictError ECIFNDECLARE eciDictFindNextA(ECIHand hEngine,
- ECIDictHand hDict, enum ECIDictVolume DictVol,
- ECIInputText *ppKey, ECIInputText *ppTranslationValue, enum ECIPartOfSpeech *pPartOfSpeech);
- enum ECIDictError ECIFNDECLARE eciDictLookupA(ECIHand hEngine,
- ECIDictHand hDict, enum ECIDictVolume DictVol,
- ECIInputText pKey, ECIInputText *ppTranslationValue, enum ECIPartOfSpeech *pPartOfSpeech);
- #define eciDictFindFirst(eciHandle, dictHandle, dictVolume, ppkey, pptranslation) \
- eciDictFindFirst((eciHandle), (dictHandle), (dictVolume), (ECIInputText *) (ppkey), (ECIInputText *) (pptranslation))
- #define eciDictFindNext(eciHandle, dictHandle, dictVolume, ppkey, pptranslation) \
- eciDictFindNext((eciHandle), (dictHandle), (dictVolume), (ECIInputText *) (ppkey), (ECIInputText *) (pptranslation))
- #ifndef __ECIFILTER_H
- #define __ECIFILTER_H
- typedef void *ECIFilterHand;
- #define NULL_FILTER_HAND 0
- typedef enum ECIFilterError {
- FilterNoError,
- FilterFileNotFound,
- FilterOutOfMemory,
- FilterInternalError,
- FilterAccessError
- };
- ECIFilterError ECIFNDECLARE eciDeactivateFilter(ECIHand eciHandle, ECIFilterHand pFilter);
- ECIFilterHand ECIFNDECLARE eciNewFilter(ECIHand eciHandle, unsigned int filterNum = 0);
- ECIFilterError ECIFNDECLARE eciActivateFilter(ECIHand eciHandle, ECIFilterHand whichFilterHand);
- ECIFilterHand ECIFNDECLARE eciDeleteFilter(ECIHand eciHandle, ECIFilterHand whichFilterHand);
- ECIFilterError ECIFNDECLARE eciUpdateFilter(ECIHand eciHandle, ECIFilterHand whichFilterHand,
- ECIInputText key, ECIInputText translation);
- ECIFilterError ECIFNDECLARE eciGetFilteredText(ECIHand eciHandle, ECIFilterHand whichFilterHand,
- ECIInputText input, ECIInputText *filteredText);
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
|