From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id 486F81EFB5E; Sun, 6 Mar 2016 14:37:23 -0500 (EST) Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138]) by befuddled.reisers.ca (Postfix) with ESMTPS id 88BE21EFB59 for ; Sun, 6 Mar 2016 14:37:21 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 94C91200BF for ; Sun, 6 Mar 2016 20:37:18 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DdUALCvFPf55 for ; Sun, 6 Mar 2016 20:37:18 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (LFbn-1-6757-94.w90-120.abo.wanadoo.fr [90.120.189.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 6E89A200BB for ; Sun, 6 Mar 2016 20:37:18 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.86_2) (envelope-from ) id 1aceUP-00065o-Pc for speakup@linux-speakup.org; Sun, 06 Mar 2016 20:37:17 +0100 Date: Sun, 6 Mar 2016 20:37:17 +0100 From: Samuel Thibault To: "Speakup is a screen review system for Linux." Subject: Re: espeakup release coming soon Message-ID: <20160306193717.GA2710@var.home> References: <20160306185459.GA6674@linux1> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="UoPmpPX/dBe4BELn" Content-Disposition: inline In-Reply-To: <20160306185459.GA6674@linux1> User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2016 19:37:23 -0000 --UoPmpPX/dBe4BELn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --UoPmpPX/dBe4BELn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=keystrokes 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, "%c", 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; } --UoPmpPX/dBe4BELn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=pidfile 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); --UoPmpPX/dBe4BELn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=voice --- 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; --UoPmpPX/dBe4BELn--