-
Notifications
You must be signed in to change notification settings - Fork 14
/
sapi4.hpp
71 lines (56 loc) · 1.46 KB
/
sapi4.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#pragma once
#include <objbase.h>
#include <speech.h>
struct _VOICE_INFO;
class CTestNotify : public ITTSNotifySink {
public:
CTestNotify (struct _VOICE_INFO *VoiceInfo);
~CTestNotify (void);
// IUnkown members that delegate to m_punkOuter
// Non-delegating object IUnknown
STDMETHODIMP QueryInterface (REFIID, LPVOID FAR *);
STDMETHODIMP_(ULONG) AddRef(void);
STDMETHODIMP_(ULONG) Release(void);
// ITTSNotifySink
STDMETHOD (AttribChanged) (DWORD);
STDMETHOD (AudioStart) (QWORD);
STDMETHOD (AudioStop) (QWORD);
STDMETHOD (Visual) (QWORD, CHAR, CHAR, DWORD, PTTSMOUTH);
private:
struct _VOICE_INFO *VoiceInfo;
};
typedef CTestNotify *PCTestNotify;
typedef struct _VOICE_INFO {
PITTSCENTRAL pITTSCentral;
TTSMODEINFO ModeInfo;
PIAUDIOFILE pIAF;
PITTSATTRIBUTES pITTSAttributes;
WORD defPitch, minPitch, maxPitch;
DWORD defSpeed, minSpeed, maxSpeed;
PCTestNotify pNotify;
BOOL VoiceDone;
} VOICE_INFO, *PVOICE_INFO;
extern __declspec(dllexport) VOID TTSCleanup(
PBYTE TTS
);
extern __declspec(dllexport) BOOL GetTTS(
PVOICE_INFO pVoiceInfo,
WORD Pitch,
DWORD Speed,
LPCSTR Text,
PUINT64 Len,
LPSTR* OutFile
);
extern __declspec(dllexport) VOID DeinitializeForVoice(
PVOICE_INFO pVoiceInfo
);
extern __declspec(dllexport) LPCSTR EnumerateVoices(
VOID
);
extern __declspec(dllexport) VOID FreeEnumerateVoices(
LPCSTR Voices
);
extern __declspec(dllexport) BOOL InitializeForVoice(
LPCSTR Voice,
PVOICE_INFO pVoiceInfo
);