Fixing spelling spaces

Samuel Thibault samuel.thibault at ens-lyon.org
Tue Mar 14 18:59:36 EDT 2017


Hello William,

Could you commit this to the espeakup repository?


Fix spelling spaces

espeak doesn't speak spaces unless strongly being told to do so :)

--- a/espeak.c
+++ b/espeak.c
@@ -170,9 +170,13 @@ static espeak_ERROR speak_text(struct sy
 	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\"> </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 */



More information about the Speakup mailing list