-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspeech.h
More file actions
32 lines (24 loc) · 1021 Bytes
/
Copy pathspeech.h
File metadata and controls
32 lines (24 loc) · 1021 Bytes
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
#define FFI_LIB "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/SpeechSynthesis.framework/Versions/Current/SpeechSynthesis"
typedef short OSErr;
typedef short SInt16;
typedef uint32_t CFStringEncoding;
typedef struct __CFAllocator CFAllocatorRef;
typedef unsigned int FourCharCode;
typedef FourCharCode OSType;
typedef void * CFStringRef;
typedef void * CFDictionaryRef;
struct SpeechChannelRecord {
long data[1];
};
typedef struct SpeechChannelRecord SpeechChannelRecord;
typedef SpeechChannelRecord * SpeechChannel;
struct VoiceSpec {
OSType creator;
OSType id;
};
typedef struct VoiceSpec VoiceSpec;
CFStringRef CFStringCreateWithCString(CFAllocatorRef * alloc, const char *cStr, CFStringEncoding encoding);
OSErr NewSpeechChannel(VoiceSpec * voice, SpeechChannel * chan);
SInt16 SpeechBusy(void);
OSErr SpeakCFString(SpeechChannel chan, CFStringRef aString, CFDictionaryRef options);
OSErr SpeakString(char * textToBeSpoken);