@@ -22,47 +22,76 @@ extern "C" | |||
{ | |||
#endif | |||
typedef enum | |||
{ | |||
ESPEAKNG_ENCODING_UNKNOWN, | |||
ESPEAKNG_ENCODING_US_ASCII, | |||
ESPEAKNG_ENCODING_ISO_8859_1, | |||
ESPEAKNG_ENCODING_ISO_8859_2, | |||
ESPEAKNG_ENCODING_ISO_8859_3, | |||
ESPEAKNG_ENCODING_ISO_8859_4, | |||
ESPEAKNG_ENCODING_ISO_8859_5, | |||
ESPEAKNG_ENCODING_ISO_8859_6, | |||
ESPEAKNG_ENCODING_ISO_8859_7, | |||
ESPEAKNG_ENCODING_ISO_8859_8, | |||
ESPEAKNG_ENCODING_ISO_8859_9, | |||
ESPEAKNG_ENCODING_ISO_8859_10, | |||
ESPEAKNG_ENCODING_ISO_8859_11, | |||
// ISO-8859-12 is not a valid encoding. | |||
ESPEAKNG_ENCODING_ISO_8859_13, | |||
ESPEAKNG_ENCODING_ISO_8859_14, | |||
ESPEAKNG_ENCODING_ISO_8859_15, | |||
ESPEAKNG_ENCODING_ISO_8859_16, | |||
ESPEAKNG_ENCODING_KOI8_R, | |||
ESPEAKNG_ENCODING_ISCII, | |||
ESPEAKNG_ENCODING_UTF_8, | |||
ESPEAKNG_ENCODING_ISO_10646_UCS_2, | |||
} espeak_ng_ENCODING; | |||
ESPEAK_NG_API espeak_ng_ENCODING | |||
espeak_ng_EncodingFromName(const char *encoding); | |||
typedef struct espeak_ng_TEXT_DECODER_ espeak_ng_TEXT_DECODER; | |||
espeak_ng_TEXT_DECODER * | |||
ESPEAK_NG_API espeak_ng_TEXT_DECODER * | |||
create_text_decoder(void); | |||
void | |||
ESPEAK_NG_API void | |||
destroy_text_decoder(espeak_ng_TEXT_DECODER *decoder); | |||
espeak_ng_STATUS | |||
ESPEAK_NG_API espeak_ng_STATUS | |||
text_decoder_decode_string(espeak_ng_TEXT_DECODER *decoder, | |||
const char *string, | |||
int length, | |||
espeak_ng_ENCODING encoding); | |||
espeak_ng_STATUS | |||
ESPEAK_NG_API espeak_ng_STATUS | |||
text_decoder_decode_string_auto(espeak_ng_TEXT_DECODER *decoder, | |||
const char *string, | |||
int length, | |||
espeak_ng_ENCODING encoding); | |||
espeak_ng_STATUS | |||
ESPEAK_NG_API espeak_ng_STATUS | |||
text_decoder_decode_wstring(espeak_ng_TEXT_DECODER *decoder, | |||
const wchar_t *string, | |||
int length); | |||
espeak_ng_STATUS | |||
ESPEAK_NG_API espeak_ng_STATUS | |||
text_decoder_decode_string_multibyte(espeak_ng_TEXT_DECODER *decoder, | |||
const void *input, | |||
espeak_ng_ENCODING encoding, | |||
int flags); | |||
int | |||
ESPEAK_NG_API int | |||
text_decoder_eof(espeak_ng_TEXT_DECODER *decoder); | |||
uint32_t | |||
ESPEAK_NG_API uint32_t | |||
text_decoder_getc(espeak_ng_TEXT_DECODER *decoder); | |||
uint32_t | |||
ESPEAK_NG_API uint32_t | |||
text_decoder_peekc(espeak_ng_TEXT_DECODER *decoder); | |||
const void * | |||
ESPEAK_NG_API const void * | |||
text_decoder_get_buffer(espeak_ng_TEXT_DECODER *decoder); | |||
#ifdef __cplusplus |
@@ -184,37 +184,6 @@ espeak_ng_CompilePhonemeDataPath(long rate, | |||
FILE *log, | |||
espeak_ng_ERROR_CONTEXT *context); | |||
/* eSpeak NG 1.49.2 */ | |||
typedef enum | |||
{ | |||
ESPEAKNG_ENCODING_UNKNOWN, | |||
ESPEAKNG_ENCODING_US_ASCII, | |||
ESPEAKNG_ENCODING_ISO_8859_1, | |||
ESPEAKNG_ENCODING_ISO_8859_2, | |||
ESPEAKNG_ENCODING_ISO_8859_3, | |||
ESPEAKNG_ENCODING_ISO_8859_4, | |||
ESPEAKNG_ENCODING_ISO_8859_5, | |||
ESPEAKNG_ENCODING_ISO_8859_6, | |||
ESPEAKNG_ENCODING_ISO_8859_7, | |||
ESPEAKNG_ENCODING_ISO_8859_8, | |||
ESPEAKNG_ENCODING_ISO_8859_9, | |||
ESPEAKNG_ENCODING_ISO_8859_10, | |||
ESPEAKNG_ENCODING_ISO_8859_11, | |||
// ISO-8859-12 is not a valid encoding. | |||
ESPEAKNG_ENCODING_ISO_8859_13, | |||
ESPEAKNG_ENCODING_ISO_8859_14, | |||
ESPEAKNG_ENCODING_ISO_8859_15, | |||
ESPEAKNG_ENCODING_ISO_8859_16, | |||
ESPEAKNG_ENCODING_KOI8_R, | |||
ESPEAKNG_ENCODING_ISCII, | |||
ESPEAKNG_ENCODING_UTF_8, | |||
ESPEAKNG_ENCODING_ISO_10646_UCS_2, | |||
} espeak_ng_ENCODING; | |||
ESPEAK_NG_API espeak_ng_ENCODING | |||
espeak_ng_EncodingFromName(const char *encoding); | |||
#ifdef __cplusplus | |||
} | |||
#endif |
@@ -30,8 +30,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "error.h" | |||
#include "speech.h" | |||
#include "phoneme.h" |
@@ -29,8 +29,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -23,9 +23,9 @@ | |||
#include <wchar.h> | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "speech.h" | |||
#include "encoding.h" | |||
#define LEADING_2_BITS 0xC0 // 0b11000000 | |||
#define UTF8_TAIL_BITS 0x80 // 0b10000000 | |||
@@ -688,6 +688,8 @@ static const encoding_t string_decoders[] = { | |||
{ string_decoder_getc_iso_10646_ucs_2, NULL }, | |||
}; | |||
#pragma GCC visibility push(default) | |||
espeak_ng_TEXT_DECODER * | |||
create_text_decoder(void) | |||
{ | |||
@@ -818,3 +820,5 @@ text_decoder_get_buffer(espeak_ng_TEXT_DECODER *decoder) | |||
return NULL; | |||
return decoder->current; | |||
} | |||
#pragma GCC visibility pop |
@@ -25,8 +25,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -26,8 +26,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -29,8 +29,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -26,8 +26,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -33,9 +33,9 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "error.h" | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -26,8 +26,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -46,8 +46,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -29,8 +29,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -29,8 +29,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "error.h" | |||
#include "speech.h" | |||
#include "phoneme.h" |
@@ -29,8 +29,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -25,9 +25,9 @@ | |||
#include <string.h> | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/encoding.h> | |||
#include <ucd/ucd.h> | |||
#include "encoding.h" | |||
#include "tokenizer.h" | |||
#include "speech.h" | |||
#include "phoneme.h" |
@@ -28,8 +28,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -29,8 +29,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -36,8 +36,8 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/speak_lib.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "speech.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" |
@@ -24,7 +24,7 @@ | |||
#include <stdio.h> | |||
#include <espeak-ng/espeak_ng.h> | |||
#include "encoding.h" | |||
#include <espeak-ng/encoding.h> | |||
void | |||
test_unbound_text_decoder() |
@@ -27,8 +27,8 @@ | |||
#include <sys/stat.h> | |||
#include <espeak-ng/espeak_ng.h> | |||
#include <espeak-ng/encoding.h> | |||
#include "encoding.h" | |||
#include "tokenizer.h" | |||
#include "speech.h" | |||
#include "phoneme.h" |