[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#816891: jessie-pu: package espeakup/1:0.71-19



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.

Samuel


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Samuel
<N> bon comment on fait de l'investigation pour savoir qui est le vilain ?
<s> on débranche le routeur et on regarde qui s'affole
 -+- #ens-mim administre -+-
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: