diff options
Diffstat (limited to 'audio/espeak-ng/files')
-rw-r--r-- | audio/espeak-ng/files/patch-src_include_espeak-ng_speak__lib.h | 15 | ||||
-rw-r--r-- | audio/espeak-ng/files/patch-src_libespeak-ng_speech.c | 28 |
2 files changed, 43 insertions, 0 deletions
diff --git a/audio/espeak-ng/files/patch-src_include_espeak-ng_speak__lib.h b/audio/espeak-ng/files/patch-src_include_espeak-ng_speak__lib.h new file mode 100644 index 000000000000..df152b5b6eb9 --- /dev/null +++ b/audio/espeak-ng/files/patch-src_include_espeak-ng_speak__lib.h @@ -0,0 +1,15 @@ +--- src/include/espeak-ng/speak_lib.h.orig 2024-12-12 13:28:01 UTC ++++ src/include/espeak-ng/speak_lib.h +@@ -544,6 +544,12 @@ extern "C" + #ifdef __cplusplus + extern "C" + #endif ++ESPEAK_API const char *espeak_TextToPhonemesWithTerminator(const void **textptr, int textmode, int phonememode, int *terminator); ++/* Version of espeak_TextToPhonemes that also returns the clause terminator (e.g., CLAUSE_INTONATION_FULL_STOP) */ ++ ++#ifdef __cplusplus ++extern "C" ++#endif + ESPEAK_API void espeak_CompileDictionary(const char *path, FILE *log, int flags); + /* Compile pronunciation dictionary for a language which corresponds to the currently + selected voice. The required voice should be selected before calling this function. diff --git a/audio/espeak-ng/files/patch-src_libespeak-ng_speech.c b/audio/espeak-ng/files/patch-src_libespeak-ng_speech.c new file mode 100644 index 000000000000..36ea86f6e328 --- /dev/null +++ b/audio/espeak-ng/files/patch-src_libespeak-ng_speech.c @@ -0,0 +1,28 @@ +--- src/libespeak-ng/speech.c.orig 2024-12-12 13:28:01 UTC ++++ src/libespeak-ng/speech.c +@@ -850,7 +850,7 @@ ESPEAK_API void espeak_SetPhonemeTrace(int phonememode + f_trans = stderr; + } + +-ESPEAK_API const char *espeak_TextToPhonemes(const void **textptr, int textmode, int phonememode) ++ESPEAK_API const char* espeak_TextToPhonemesWithTerminator(const void** textptr, int textmode, int phonememode, int* terminator) + { + /* phoneme_mode + bit 1: 0=eSpeak's ascii phoneme names, 1= International Phonetic Alphabet (as UTF-8 characters). +@@ -864,10 +864,15 @@ ESPEAK_API const char *espeak_TextToPhonemes(const voi + if (text_decoder_decode_string_multibyte(p_decoder, *textptr, translator->encoding, textmode) != ENS_OK) + return NULL; + +- TranslateClause(translator, NULL, NULL); ++ TranslateClauseWithTerminator(translator, NULL, NULL, terminator); + *textptr = text_decoder_get_buffer(p_decoder); + + return GetTranslatedPhonemeString(phonememode); ++} ++ ++ESPEAK_API const char *espeak_TextToPhonemes(const void **textptr, int textmode, int phonememode) ++{ ++ return espeak_TextToPhonemesWithTerminator(textptr, textmode, phonememode, NULL); + } + + ESPEAK_NG_API espeak_ng_STATUS espeak_ng_Cancel(void) |