public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
From: William Hubbs <w.d.hubbs@gmail.com>
To: "Speakup is a screen review system for Linux."
	<speakup@linux-speakup.org>
Subject: Re: espeakup release coming soon
Date: Sun, 6 Mar 2016 16:02:49 -0600	[thread overview]
Message-ID: <20160306220249.GA7506@linux1> (raw)
In-Reply-To: <20160306193717.GA2710@var.home>

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@linux-speakup.org
> http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup


  reply	other threads:[~ UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 William Hubbs
 ` Jude DaShiell
   ` William Hubbs
   ` Samuel Thibault
     ` Chris Brannon
       ` Samuel Thibault
         ` Chris Brannon
           ` Samuel Thibault
     ` Mark Peveto
       ` Samuel Thibault
         ` Mark Peveto
           ` Chris Brannon
           ` Samuel Thibault
 ` Samuel Thibault
   ` William Hubbs [this message]
     ` Samuel Thibault
   ` William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160306220249.GA7506@linux1 \
    --to=w.d.hubbs@gmail.com \
    --cc=speakup@linux-speakup.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).