[BRLTTY] Build brltty with support for espeak-ng

Dave Mielke Dave at mielke.cc
Mon Dec 9 14:08:26 EST 2019


[quoted lines by Tage Johansson on 2019/12/08 at 19:35 +0100]

>I ran:
>
>$ sudo ./run-brltty -Lbrltty.log -lspeech,debug

Thanks for the log. I think what we need to do is to verify that what we think
should be happening is indeed actually happening. In addition, we can get more
timing clues.

I've attached a patch (as speech-test-1.patch). It adds "before" and "after"
logs to explicit mute requests, to say mute requests, and to say text requests.
Could you please capture another log after applying this patch?

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke            | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |
-------------- next part --------------
diff --git a/Programs/spk_thread.c b/Programs/spk_thread.c
index 4257e137b..b043744d0 100644
--- a/Programs/spk_thread.c
+++ b/Programs/spk_thread.c
@@ -461,7 +461,11 @@ handleSpeechRequest (volatile SpeechDriverThread *sdt, SpeechRequest *req) {
         int restorePitch = 0;
         int restorePunctuation = 0;
 
-        if (options & SAY_OPT_MUTE_FIRST) speech->mute(spk);
+        if (options & SAY_OPT_MUTE_FIRST) {
+          logMessage(LOG_CATEGORY(SPEECH_EVENTS), "before say mute");
+          speech->mute(spk);
+          logMessage(LOG_CATEGORY(SPEECH_EVENTS), "after say mute");
+        }
 
         if (options & SAY_OPT_HIGHER_PITCH) {
           if (spk->setPitch) {
@@ -487,10 +491,12 @@ handleSpeechRequest (volatile SpeechDriverThread *sdt, SpeechRequest *req) {
           }
         }
 
+        logMessage(LOG_CATEGORY(SPEECH_EVENTS), "before say text");
         speech->say(spk,
           req->arguments.sayText.text, req->arguments.sayText.length,
           req->arguments.sayText.count, req->arguments.sayText.attributes
         );
+        logMessage(LOG_CATEGORY(SPEECH_EVENTS), "after say text");
 
         if (restorePunctuation) spk->setPunctuation(spk, prefs.speechPunctuation);
         if (restorePitch) spk->setPitch(spk, prefs.speechPitch);
@@ -500,7 +506,9 @@ handleSpeechRequest (volatile SpeechDriverThread *sdt, SpeechRequest *req) {
       }
 
       case REQ_MUTE_SPEECH: {
+        logMessage(LOG_CATEGORY(SPEECH_EVENTS), "before explicit mute");
         speech->mute(spk);
+        logMessage(LOG_CATEGORY(SPEECH_EVENTS), "after explicit mute");
 
         sendIntegerResponse(sdt, 1);
         break;


More information about the BRLTTY mailing list