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

Bug#1006192: bullseye-pu: package espeak-ng/1.50+dfsg-7+deb11u1



Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian.org@packages.debian.org
Usertags: pu

Hello,

I'd like to upload the attached changes to bullseye (already queued)

[ Reason ]
People have reported that when they work on the linux console with the
espeakup screen reader, if they e.g. cat a long file, and the reader
starts speaking it, and the user presses some key to interrupt the read,
the screen reader remains silent for several seconds before it speaks
anything again. That is because the speaking events for all the file
reading have still been queued and the speak cancellation just makes
them processed very quickly to flush the queue. Unfortunately there is a
little usleep(50ms) that is performed on each event processing. This is
a very old trick that was probably browntape-fixing some erroneous
condition. We tried to remove that sleep and it didn't seem to have any
nasty side effect. Upstream did commit the change and users are really
happy with the change that completely fixes the delay.

[ Impact ]
Any action that creates long outputs (catting a long file, running
dmesg, listing a long directory, etc.) introduce long latency even when
the user wants to stop the speaking.

[ Tests ]
This was tested manually by the reporters.

[ Risks ]
The code by itself is trivial. The sleep was probably meant to "fix"
something but it seems that that something doesn't exist any more.

[ Checklist ]
  [X] *all* changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in (old)stable
  [X] the issue is verified as fixed in unstable

[ Changes ]
This just removes a spurious sleep.
diff -Nru espeak-ng-1.50+dfsg/debian/changelog espeak-ng-1.50+dfsg/debian/changelog
--- espeak-ng-1.50+dfsg/debian/changelog	2020-08-02 01:26:35.000000000 +0200
+++ espeak-ng-1.50+dfsg/debian/changelog	2022-02-13 02:41:25.000000000 +0100
@@ -1,3 +1,10 @@
+espeak-ng (1.50+dfsg-7+deb11u1) bullseye; urgency=medium
+
+  * patches/even-delay: Drop spurious 50ms delay while processing events, this
+    adds potentially very long latency to canceling speech.
+
+ -- Samuel Thibault <sthibault@debian.org>  Sun, 13 Feb 2022 02:41:25 +0100
+
 espeak-ng (1.50+dfsg-7) unstable; urgency=medium
 
   * patches/no-common: Fix build with gcc-10 (Closes: Bug#957181).
diff -Nru espeak-ng-1.50+dfsg/debian/patches/event-delay espeak-ng-1.50+dfsg/debian/patches/event-delay
--- espeak-ng-1.50+dfsg/debian/patches/event-delay	1970-01-01 01:00:00.000000000 +0100
+++ espeak-ng-1.50+dfsg/debian/patches/event-delay	2022-02-13 02:41:25.000000000 +0100
@@ -0,0 +1,29 @@
+https://github.com/espeak-ng/espeak-ng/pull/1077
+
+commit 977bff9a061fbd6b44835a6ce45ad887634ae068
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date:   Sun Feb 13 02:54:00 2022 +0100
+
+    event_notify: Remove spurious 50ms delay
+    
+    event_notify currently introduces an arbitrary 50ms delay between speech
+    requests. This is usually unnoticed since it's small. But when
+    cancelling a long series of events, they add up to potentially seconds
+    of delays, while the user was precisely requesting to just cancel
+    everything as fast as possible.
+    
+    This 50ms delay was probably meant to work around some issues elsewhere.
+    If they are still there, they should be fixed, not worked around.
+
+diff --git a/src/libespeak-ng/event.c b/src/libespeak-ng/event.c
+index acf3a39e..5561fdbc 100644
+--- a/src/libespeak-ng/event.c
++++ b/src/libespeak-ng/event.c
+@@ -161,7 +161,6 @@ static void event_notify(espeak_EVENT *event)
+ 				events[0].type = espeakEVENT_SENTENCE;
+ 				my_callback(NULL, 0, events);
+ 				events[0].type = a_new_type;
+-				usleep(50000);
+ 			}
+ 			my_callback(NULL, 0, events);
+ 			a_old_uid = event->unique_identifier;
diff -Nru espeak-ng-1.50+dfsg/debian/patches/series espeak-ng-1.50+dfsg/debian/patches/series
--- espeak-ng-1.50+dfsg/debian/patches/series	2020-04-18 22:16:12.000000000 +0200
+++ espeak-ng-1.50+dfsg/debian/patches/series	2022-02-13 02:41:25.000000000 +0100
@@ -6,3 +6,4 @@
 greek-rules
 fix-tests-bash
 no-common
+event-delay
diff -Nru espeak-ng-1.50+dfsg/debian/salsa-ci.yml espeak-ng-1.50+dfsg/debian/salsa-ci.yml
--- espeak-ng-1.50+dfsg/debian/salsa-ci.yml	1970-01-01 01:00:00.000000000 +0100
+++ espeak-ng-1.50+dfsg/debian/salsa-ci.yml	2022-02-13 02:41:25.000000000 +0100
@@ -0,0 +1,10 @@
+---
+include:
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+
+variables:
+  SALSA_CI_DISABLE_VERSION_BUMP: 1
+  RELEASE: bullseye
+
+# vim: ts=2 sw=2 et sts=2 ft=yaml

Reply to: