espeakup release coming soon
William Hubbs
w.d.hubbs at gmail.com
Sun Mar 6 17:02:49 EST 2016
Hi,
do you know who wrote these patches? I would like to make sure I give
proper credit in the logs.
Thanks,
William
On Sun, Mar 06, 2016 at 08:37:17PM +0100, Samuel Thibault wrote:
> Hello,
>
> William Hubbs, on Sun 06 Mar 2016 12:54:59 -0600, wrote:
> > I want to do a new espeakup release, hopefully in the next few days, so,
> > I need to know if there are any patches that we need. Can folks take a
> > look at it and let me know if anything is missing?
>
> Good idea to ask :)
>
> We have a few patches in Debian:
>
> - keystrokes uses interpret-as="characters" when the kernel reports just
> one character. This allows to use espeak's internationalized spelling of
> letters, instead of having to maintain spelling ourself in speakup.
> - pidfile makes espeakup write the pidfile only after it is really
> finished starting. We need this to properly report that the daemon
> hasn't actually started when it failed to e.g. open voices.
> - voice fixes using language names as espeakup parameter instead of
> voice names, just like the espeak program does.
>
> Samuel
> Fix spelling keystrokes and char-by-char echo.
>
> --- espeakup-0.71.orig/synth.c
> +++ espeakup-0.71/synth.c
> @@ -121,7 +121,29 @@
> {
> espeak_ERROR rc;
>
> - rc = espeak_Synth(s->buf, s->len + 1, 0, POS_CHARACTER, 0, 0, NULL,
> - NULL);
> + if (s->len == 1)
> + {
> + char *buf;
> + int n;
> + 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 */
> + rc = espeak_Synth(s->buf, s->len + 1, 0, POS_CHARACTER, 0, 0, NULL,
> + NULL);
> + }
> + else
> + {
> + rc = espeak_Synth(buf, n + 1, 0, POS_CHARACTER, 0, espeakSSML, NULL,
> + NULL);
> + free(buf);
> + }
> + }
> + else
> + {
> + rc = espeak_Synth(s->buf, s->len + 1, 0, POS_CHARACTER, 0, 0, NULL,
> + NULL);
> + }
> return rc;
> }
> Create pidfile after espeakup is really ready.
>
> --- espeakup-0.71.orig/espeakup.c
> +++ espeakup-0.71/espeakup.c
> @@ -118,12 +118,6 @@
> if (!debug) {
> /* become a daemon */
> daemon(0, 1);
> -
> - /* write our pid file. */
> - if (create_pid_file() < 0) {
> - perror("Unable to create pid file");
> - return 2;
> - }
> }
>
> /* initialize espeak */
> @@ -147,6 +141,14 @@
> return 4;
> }
>
> + if (!debug) {
> + /* We are now ready, write our pid file. */
> + if (create_pid_file() < 0) {
> + perror("Unable to create pid file");
> + return 2;
> + }
> + }
> +
> /* run the main loop */
> main_loop(&s);
>
> --- a/synth.c
> +++ b/synth.c
> @@ -91,6 +91,13 @@ espeak_ERROR set_voice(struct synth_t *
> espeak_ERROR rc;
>
> rc = espeak_SetVoiceByName(voice);
> + if (rc != EE_OK)
> + {
> + espeak_VOICE voice_select;
> + memset(&voice_select, 0, sizeof(voice_select));
> + voice_select.languages = voice;
> + rc = espeak_SetVoiceByProperties(&voice_select);
> + }
> if (rc == EE_OK)
> strcpy(s->voice, voice);
> return rc;
> _______________________________________________
> Speakup mailing list
> Speakup at linux-speakup.org
> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
More information about the Speakup
mailing list