esdvoicedll.h

来自「蓝天盲人电脑软件」· C头文件 代码 · 共 71 行

H
71
字号

// The following ifdef block is the standard way of creating macros which make exporting 
// from a DLL simpler. All files within this DLL are compiled with the ESDVOICEDLL_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see 
// ESDVOICEDLL_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#define ESDVOICEDLL_API extern "C" __declspec(dllexport)
//#else
//#define ESDVOICEDLL_API __declspec(dllimport)
//#endif
#define WM_ESD_VOICEENDEVENT WM_USER+10 
//#define TTS_EVENTS SPFEI(SPEI_END_INPUT_STREAM)//|SPFEI(SPEI_VOICE_CHANGE)

/*
// This class is exported from the EsdVoiceDll.dll
class ESDVOICEDLL_API CEsdVoiceDll {
public:
	CEsdVoiceDll(void);
	// TODO: add your methods here.
};

extern ESDVOICEDLL_API int nEsdVoiceDll;

ESDVOICEDLL_API int fnEsdVoiceDll(void);
*/

//#include "eci.h"
//局部变量

//全局变量


//需要导出的变量
	ESDVOICEDLL_API   DWORD             dwHandleID;

//需要导出的函数
	ESDVOICEDLL_API BOOL    EsdInitInstance();
	ESDVOICEDLL_API void    EsdCleanAll();
	ESDVOICEDLL_API BOOL	EsdSetBasePitch(int nPitch);
	ESDVOICEDLL_API BOOL    EsdSetPitchFluctuaion(int nPitch);
	ESDVOICEDLL_API BOOL	EsdSetGender(int nGender);
	ESDVOICEDLL_API BOOL	EsdSetHeadSize(int nPitch);
	ESDVOICEDLL_API BOOL	EsdSetRoughness(int nPitch);
	ESDVOICEDLL_API BOOL	EsdSetBreathiness(int nPitch);
	ESDVOICEDLL_API	BOOL    EsdSetRate(int nRate);
	ESDVOICEDLL_API	BOOL    EsdSetVolume(int nVolume);
	ESDVOICEDLL_API void    EsdSetMale();
	ESDVOICEDLL_API void    EsdSetFemale();

	ESDVOICEDLL_API	BOOL    EsdChangeEngine(char* szEngineString );
	ESDVOICEDLL_API	BOOL    EsdResumeVoice();
	ESDVOICEDLL_API	BOOL    EsdPauseVoice();
	ESDVOICEDLL_API	BOOL    EsdStopVoice();
	ESDVOICEDLL_API BOOL    EsdSpeakVoice(LPTSTR szTextString, int nReadLen);
    ESDVOICEDLL_API void    EsdInitVoiceEvent(HWND hwnd);
	ESDVOICEDLL_API HRESULT ReadTxtFile(TCHAR* szFileName, BOOL* bIsUnicode, WCHAR** ppszwBuff);

	ESDVOICEDLL_API void    EsdGetSysLang(BOOL bGbLang);
	ESDVOICEDLL_API void    EsdMutilSpeakVoice(LPTSTR szTextString);

	ESDVOICEDLL_API void    EsdSetVoiceNumber(int nNumber);
	ESDVOICEDLL_API void    EsdSetEnglishTextMode(int nELink);
	
	//内部调用函数

	LPTSTR	EsdGetLanName(int nIndex);
	int		EsdGetLanNum();

#define MAXFILESIZE   32*1024

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?