From 0a31420cd75fc76591772d6dca0d9f486406f9e2 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Mon, 29 May 2017 11:21:12 +0100 Subject: [PATCH 1/2] en (emoji): fix speaking the place medal emojis --- dictsource/en_emoji | 6 +++--- dictsource/en_list | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dictsource/en_emoji b/dictsource/en_emoji index ecedc314..39a8d0f2 100644 --- a/dictsource/en_emoji +++ b/dictsource/en_emoji @@ -1133,9 +1133,9 @@ $textmode 🥃 tumbler glass // [1F943] 🥄 spoon // [1F944] 🥅 goal net // [1F945] -🥇 1st place medal // [1F947] -🥈 2nd place medal // [1F948] -🥉 3rd place medal // [1F949] +🥇 first place medal // [1F947] +🥈 second place medal // [1F948] +🥉 third place medal // [1F949] 🥊 boxing glove // [1F94A] 🥋 martial arts uniform // [1F94B] 🥌 curling stone // [1F94C] diff --git a/dictsource/en_list b/dictsource/en_list index a2681718..b1e02404 100644 --- a/dictsource/en_list +++ b/dictsource/en_list @@ -5221,8 +5221,6 @@ zune zu:n (far more) f'A@_m,o@ (few more) f'ju:m,o@ -(first place) f'3:st_pl,eIs -?5 (first place) f'IRst_pl,eIs (here and there) h'i@3||a#nd||D'e@ (most of) moUst||@v (such as) sVtS||_a#z $pause From 416bc66dca83ffb6aa22f3dae837327b9db221e2 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Mon, 29 May 2017 11:53:33 +0100 Subject: [PATCH 2/2] Fix pronouncing replacement text that is dependent on start of word rules. --- src/libespeak-ng/translate.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libespeak-ng/translate.c b/src/libespeak-ng/translate.c index ce57ba63..abecc5fc 100644 --- a/src/libespeak-ng/translate.c +++ b/src/libespeak-ng/translate.c @@ -1134,6 +1134,14 @@ int TranslateWord(Translator *tr, char *word_start, WORD_TAB *wtab, char *word_o int flags = TranslateWord3(tr, word_start, wtab, word_out); if (flags & FLAG_TEXTMODE && word_out) { + // Ensure that start of word rules match with the replaced text, + // so that emoji and other characters are pronounced correctly. + char word[N_WORD_BYTES+1]; + word[0] = 0; + word[1] = ' '; + memcpy(word+2, word_out, strlen(word_out)); + word_out = word+2; + while (*word_out && available > 1) { int c; utf8_in(&c, word_out);