Package: espeakup / 1:0.80-16

space Patch series | download
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
commit a5b655ddb066eb5915117452f62937b2a9bf3256
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Mar 14 21:56:31 2017 -0500

    fix speaking spaces
    
    Espeak doesn't speak spaces unless it is specifically told to do so.

diff --git a/espeak.c b/espeak.c
index f09d3c4..f1f8064 100644
--- a/espeak.c
+++ b/espeak.c
@@ -170,9 +170,13 @@ static espeak_ERROR speak_text(struct synth_t *s)
 	if (espeakup_mode == ESPEAKUP_MODE_SPEAKUP && (s->len == 1)) {
 		char *buf;
 		int n;
-		n = asprintf(&buf,
-			     "<say-as interpret-as=\"characters\">%c</say-as>",
-			     s->buf[0]);
+		if (s->buf[0] == ' ')
+			n = asprintf(&buf,
+				     "<say-as interpret-as=\"tts:char\">&#32;</say-as>");
+		else
+			n = asprintf(&buf,
+				     "<say-as interpret-as=\"characters\">%c</say-as>",
+				     s->buf[0]);
 		if (n == -1) {
 			/* D'oh.  Not much to do on allocation failure.
 			 * Perhaps espeak will happen to say the character */