Bug#816891: jessie-pu: package espeakup/1:0.71-19
cc += kibi
On Sun, Mar 6, 2016 at 11:21:24 +0100, Samuel Thibault wrote:
> Package: release.debian.org
> Severity: normal
> Tags: jessie
> User: release.debian.org@packages.debian.org
> Usertags: pu
>
> Hello,
>
> I'd like to upload to Jessie the attached changes to the espeakup
> package.
>
> The current Jessie debian installer got a bug which made it only support
> german, english, french, and portuguese. That is because the file
> hierarchy of voices has changed in the updated upstream version, and
> they had provided compatibility links, but only for those languages.
>
> The attached change uses a mere recursive grep to find language
> identifiers instead of hardcoding the path. That actually allows to drop
> the special-casing of the nb language. The change also special cases
> gallician, for which we have no native support, but the portuguese voice
> should be fine enough, better than english anyway. It also makes the
> espeakup daemon select the voice not only by name, but also by property,
> just like the espeak program does, which is needed when the voice is
> chosen by the language it supports and not by the identifier of the
> voice.
>
Since the changes affect d-i in stable, I'd like a kibi-ack.
Cheers,
Julien
> diff --exclude .svn --exclude .git --exclude CVS --exclude .hg -ur espeakup-0.71-orig/debian/changelog espeakup-0.71/debian/changelog
> --- espeakup-0.71-orig/debian/changelog 2016-03-06 10:48:36.000000000 +0100
> +++ espeakup-0.71/debian/changelog 2016-03-06 10:54:47.723787694 +0100
> @@ -1,3 +1,15 @@
> +espeakup (1:0.71-19+deb8u1) jessie; urgency=medium
> +
> + * espeakup-udeb.restart:
> + - Make looking up available languages independent from file hierarchy, thus
> + fixing all language (but de, en, fr, pt which were still working)... This
> + also allows dropping special-casing nb into no.
> + - Use portuguese for galician, since they are so close, and portuguese
> + will always be better than english anyway.
> + * synth.c: Fix looking up voices by language name.
> +
> + -- Samuel Thibault <sthibault@debian.org> Thu, 31 Dec 2015 15:22:01 +0100
> +
> espeakup (1:0.71-19) unstable; urgency=medium
>
> * Enable STARTTIME to work around racy daemon start test.
> diff --exclude .svn --exclude .git --exclude CVS --exclude .hg -ur espeakup-0.71-orig/debian/espeakup-udeb.restart espeakup-0.71/debian/espeakup-udeb.restart
> --- espeakup-0.71-orig/debian/espeakup-udeb.restart 2016-03-06 10:48:36.000000000 +0100
> +++ espeakup-0.71/debian/espeakup-udeb.restart 2016-03-06 10:52:14.304762663 +0100
> @@ -12,17 +12,17 @@
> lang=`echo $locale | sed 's/_.*//'`
> country=`echo $locale | sed 's/.*_//;s/\..*//;s/@.*//' | tr A-Z a-z`
>
> -if [ "$lang" = nb ]
> +if [ "$lang" = gl ]
> then
> - lang=no
> + # Not supported by espeak yet, but pt should be fine enough, better than
> + # english anyway
> + lang=pt
> fi
>
> -if [ -f /usr/lib/*/espeak-data/voices/$lang-$country ] || \
> - [ -f /usr/lib/*/espeak-data/voices/$lang/$lang-$country ]
> +if grep -r "^language $lang-$country$" /usr/lib/*/espeak-data/voices
> then
> VOICE="$lang-$country"
> -elif [ -f /usr/lib/*/espeak-data/voices/$lang ] || \
> - [ -f /usr/lib/*/espeak-data/voices/$lang/$lang ]
> +elif grep -r "^language $lang$" /usr/lib/*/espeak-data/voices
> then
> VOICE="$lang"
> else
> diff --exclude .svn --exclude .git --exclude CVS --exclude .hg -ur espeakup-0.71-orig/synth.c espeakup-0.71/synth.c
> --- espeakup-0.71-orig/synth.c 2016-03-06 10:48:36.000000000 +0100
> +++ espeakup-0.71/synth.c 2016-03-06 10:51:48.814924736 +0100
> @@ -91,6 +91,13 @@
> 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;
Reply to: