static espeak_ng_STATUS err = ENS_OK; | static espeak_ng_STATUS err = ENS_OK; | ||||
static t_espeak_callback *synth_callback = NULL; | static t_espeak_callback *synth_callback = NULL; | ||||
int (*uri_callback)(int, const char *, const char *) = NULL; | |||||
int (*phoneme_callback)(const char *) = NULL; | int (*phoneme_callback)(const char *) = NULL; | ||||
char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory | char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory | ||||
#endif | #endif | ||||
} | } | ||||
ESPEAK_API void espeak_SetUriCallback(int (*UriCallback)(int, const char *, const char *)) | |||||
{ | |||||
uri_callback = UriCallback; | |||||
} | |||||
ESPEAK_API void espeak_SetPhonemeCallback(int (*PhonemeCallback)(const char *)) | ESPEAK_API void espeak_SetPhonemeCallback(int (*PhonemeCallback)(const char *)) | ||||
{ | { | ||||
phoneme_callback = PhonemeCallback; | phoneme_callback = PhonemeCallback; |
{ NULL, 0 } | { NULL, 0 } | ||||
}; | }; | ||||
static int (*uri_callback)(int, const char *, const char *) = NULL; | |||||
static int attrcmp(const wchar_t *string1, const char *string2) | static int attrcmp(const wchar_t *string1, const char *string2) | ||||
{ | { | ||||
int ix; | int ix; | ||||
return 0; | return 0; | ||||
} | } | ||||
#pragma GCC visibility push(default) | |||||
ESPEAK_API void espeak_SetUriCallback(int (*UriCallback)(int, const char *, const char *)) | |||||
{ | |||||
uri_callback = UriCallback; | |||||
} | |||||
#pragma GCC visibility pop | |||||
static const MNEM_TAB xml_entity_mnemonics[] = { | static const MNEM_TAB xml_entity_mnemonics[] = { | ||||
{ "gt", '>' }, | { "gt", '>' }, | ||||
{ "lt", 0xe000 + '<' }, // private usage area, to avoid confusion with XML tag | { "lt", 0xe000 + '<' }, // private usage area, to avoid confusion with XML tag |
extern espeak_ng_TEXT_DECODER *p_decoder; | extern espeak_ng_TEXT_DECODER *p_decoder; | ||||
extern int dictionary_skipwords; | extern int dictionary_skipwords; | ||||
extern int (*uri_callback)(int, const char *, const char *); | |||||
extern int (*phoneme_callback)(const char *); | extern int (*phoneme_callback)(const char *); | ||||
#define LEADING_2_BITS 0xC0 // 0b11000000 | #define LEADING_2_BITS 0xC0 // 0b11000000 |