[BRLTTY] test result, was re: brltty 4.3 and papenmeier

Nicolas Pitre nico at fluxnic.net
Mon May 14 15:22:40 EDT 2012


On Mon, 14 May 2012, Nicolas Pitre wrote:

> On Mon, 14 May 2012, Dave Mielke wrote:
> 
> > [quoted lines by Nicolas Pitre on 2012/05/14 at 14:11 -0400]
> > 
> > >Well, I can reproduce it with the latest code, but only if "Show All 
> > >Items" is "Yes", and not when it is "No" as illustrated above.  I 
> > >therefore checked out yesterday's version I used for testing last night 
> > >and then the stutter is reproducible irrespective of the "Show All 
> > >Items" setting with that version.  So something very fishy must be 
> > >happening here.
> > 
> > It may be TTS dependent.
> 
> Maybe.  However the only variable here is the BRLTTY code version.

OK, here's a log.  First attachment is a small patch adding speak 
requests to the log.  This could be moved in the core code to be useful 
regardless of the driver used.

Second attachment is the resulting log.  You can see from line 176 a 
first stutter. Then a second stutter from line 233.

In each case, it is strange to see a partial string to be spoken, then 
it is muted before the TTS is done with it, and then the same string is 
sent again, complete this time.

I noticed that the spoken string tend to grow as follows:

brltty: say: "M"
brltty: say: "Menu Options: ---> (3)"
brltty: say: "<---    "
brltty: say: "Save on Exit: Yes     "
brltty: say: "Show All Items: Yes   "
brltty: say: "Show Submenu Sizes: Ye"
brltty: say: "Show Submenu Sizes: Yes"

The 3rd line contains only the arrow since the rest of the line content 
was the same.  but if we patch this content in, we now get:

brltty: say: "M"
brltty: say: "Menu Options: ---> (3)"
brltty: say: "Menu Options: <---    "
brltty: say: "Save on Exit: Yes     "
brltty: say: "Show All Items: Yes   "
brltty: say: "Show Submenu Sizes: Ye"
brltty: say: "Show Submenu Sizes: Yes"

Notice the alignment of the closing quote from one line to the next. I 
don't know this code, but if I were to guess, there is some kind of 
dynamic line length adjustment going on, and this gets reflected in 
subsequent shorter lines by blank padding.  And each time the length is 
increased, the shortened line was already sent to the TTS.  And 
strangely enough, the new line is sent to the TTS quite a while later 
i.e. after the first word has already been spoken, creating a stutter.

I suspect there is something rather unintended going on in the code 
here.


Nicolas
-------------- next part --------------
diff --git a/Drivers/Speech/ExternalSpeech/speech.c b/Drivers/Speech/ExternalSpeech/speech.c
index 4d3cc09..2c89292 100644
--- a/Drivers/Speech/ExternalSpeech/speech.c
+++ b/Drivers/Speech/ExternalSpeech/speech.c
@@ -286,6 +286,7 @@ static void spk_say(SpeechSynthesizer *spk, const unsigned char *text, size_t le
 {
   unsigned char l[5];
   if(helper_fd_out < 0) return;
+  logMessage (LOG_DEBUG, "say: \"%*s\"", length, text);
   l[0] = 4; /* say code */
   l[1] = length >> 8;
   l[2] = length & 0xFF;
-------------- next part --------------
BRLTTY 4.4dev [http://mielke.cc/brltty/]
brltty: Working Directory: /home/nico/brltty/git/brltty
brltty: Writable Directory: /var/run/brltty
brltty: Configuration File: /etc/brltty.conf
brltty: Preferences File: brltty.prefs
brltty: file opened: /var/lib/brltty/brltty.prefs fd=3
brltty: file opened: /var/lib/brltty/brltty.prefs fd=3
brltty: regions: text=0.0 status=0.0
brltty: shifts: full=1 half=0 vertical=5
brltty: Drivers Directory: /home/nico/brltty/git/brltty/Programs/../lib
brltty: Tables Directory: /home/nico/brltty/git/brltty/Programs/../Tables
brltty: compiling text table: /etc/brltty/nico.ttb
brltty: file opened: /etc/brltty/nico.ttb fd=3
brltty: including data file: /etc/brltty/nico.ttb
brltty: file opened: /etc/brltty/common.tti fd=4
brltty: including data file: /etc/brltty/common.tti
brltty: file opened: /etc/brltty/spaces.tti fd=5
brltty: including data file: /etc/brltty/spaces.tti
brltty: file opened: /etc/brltty/boxes.tti fd=5
brltty: including data file: /etc/brltty/boxes.tti
brltty: file opened: /etc/brltty/blocks.tti fd=5
brltty: including data file: /etc/brltty/blocks.tti
brltty: Text Table: /etc/brltty/nico.ttb
brltty: Attributes Table: attributes
brltty: compiling contraction table: /home/nico/brltty/git/brltty/Programs/../Tables/fr-abrege.ctb
brltty: file opened: /home/nico/brltty/git/brltty/Programs/../Tables/fr-abrege.ctb fd=3
brltty: including data file: /home/nico/brltty/git/brltty/Programs/../Tables/fr-abrege.ctb
brltty: file opened: /home/nico/brltty/git/brltty/Programs/../Tables/fr-integral.ctb fd=4
brltty: including data file: /home/nico/brltty/git/brltty/Programs/../Tables/fr-integral.ctb
brltty: file opened: /home/nico/brltty/git/brltty/Programs/../Tables/letters-latin.cti fd=5
brltty: including data file: /home/nico/brltty/git/brltty/Programs/../Tables/letters-latin.cti
brltty: Contraction Table: fr-abrege.ctb
brltty: Key Table: none
brltty: Keyboard Property: type=
brltty: Keyboard Property: vendor=
brltty: Keyboard Property: product=
brltty: checking for screen driver: lx
brltty: initializing screen driver: lx
brltty: device directory: /dev
brltty: checking screen device: /dev/vcsa
brltty: screen device: vcsa
brltty: checking console device: /dev/tty0
brltty: console device: tty0
brltty: device opened: /dev/vcsa: fd=3
brltty: screen opened: vcsa: fd=3
brltty: device opened: /dev/tty0: fd=4
brltty: console opened: tty0: fd=4
brltty: Screen Font Map Size: 545
brltty: VGA Character Count: 512(large)
brltty: attributes masks: font=0100 unshifted=F000 shifted=0E00
brltty: Screen Driver: lx [Linux]
brltty: Linux Screen Driver:
brltty: Screen Parameter: charset=
brltty: Screen Parameter: hfb=
brltty: Screen Parameter: debugsfm=
brltty: BrlAPI Server: release 0.5.6
brltty: API Parameter: auth=
brltty: API Parameter: host=
brltty: API Parameter: stacksize=
brltty: checking braille device: usb:
brltty: performing braille driver autodetection
brltty: checking for braille driver: al
brltty: initializing braille driver: al -> usb:
brltty: verifying file system path: usbfs: /dev/bus/usb
brltty: USBFS Root: /dev/bus/usb
brltty: socket 1 established (fd 8)
brltty: linking local socket lock: File exists
brltty: socket 0 established (fd 5)
brltty: USB: testing: vendor=1D6B product=0001
brltty: USB: testing: vendor=1D6B product=0001
brltty: USB: testing: vendor=1D6B product=0001
brltty: USB: testing: vendor=0403 product=FE72
brltty: USB: testing: vendor=1D6B product=0001
brltty: USB: testing: vendor=067B product=2303
brltty: USB: testing: vendor=1D6B product=0001
brltty: USB: testing: vendor=1D6B product=0001
brltty: USB: testing: vendor=1D6B product=0002
brltty: USB: testing: vendor=1D6B product=0002
brltty: USB device not found
brltty: braille driver initialization failed: al -> usb:
brltty: checking for braille driver: bm
brltty: initializing braille driver: bm -> usb:
brltty: USB: testing: vendor=1D6B product=0001
brltty: USB: testing: vendor=1D6B product=0001
brltty: USB: testing: vendor=1D6B product=0001
brltty: USB: testing: vendor=0403 product=FE72
brltty: USB: ept=81 dir=in xfr=blk pkt=64 ivl=0ms
brltty: USB: ept=02 dir=out xfr=blk pkt=64 ivl=0ms
brltty: USB Language: 409
brltty: USB: Manufacturer Name: HumanWare
brltty: USB: Product Description: Brailliant 40
brltty: USB: Serial Number: 25000072
brltty: probing with Baum protocol
brltty: FTDI Request: 03 809C 0000
brltty: FTDI Request: 04 0008 0000
brltty: FTDI Request: 02 0000 0000
brltty: Baum Serial Number: 25008572
brltty: Cell Count: 40 (40 text, 0 status)
brltty: Braille Display Dimensions: 1 row, 40 columns
brltty: regions: text=0.40 status=0.0
brltty: shifts: full=40 half=20 vertical=5
brltty: Key Bindings: default
brltty: file opened: /home/nico/brltty/git/brltty/Programs/../Tables/brl-bm-default.ktb fd=7
brltty: including data file: /home/nico/brltty/git/brltty/Programs/../Tables/brl-bm-default.ktb
brltty: file opened: /home/nico/brltty/git/brltty/Programs/../Tables/brl-bm-display6.kti fd=9
brltty: including data file: /home/nico/brltty/git/brltty/Programs/../Tables/brl-bm-display6.kti
brltty: file opened: /home/nico/brltty/git/brltty/Programs/../Tables/brl-bm-keyboard.kti fd=9
brltty: including data file: /home/nico/brltty/git/brltty/Programs/../Tables/brl-bm-keyboard.kti
brltty: file opened: /home/nico/brltty/git/brltty/Programs/../Tables/brl-bm-routing6.kti fd=9
brltty: including data file: /home/nico/brltty/git/brltty/Programs/../Tables/brl-bm-routing6.kti
brltty: Key Table: /home/nico/brltty/git/brltty/Programs/../Tables/brl-bm-default.ktb
brltty: api link
brltty: Braille Driver: bm [Baum]
brltty: Baum Braille Driver:
brltty: Braille Parameter: protocols=
brltty: Braille Parameter: variokeys=
brltty: Braille Device: usb:
brltty: Old Preferences File: /etc/brltty-bm.prefs
brltty: regions: text=0.40 status=0.0
brltty: shifts: full=40 half=20 vertical=5
brltty: exit status: 0
brltty: console opened: fd=7
brltty: beeper enabled
brltty: tone: msec=60 note=64
brltty: tone: msec=100 note=69
brltty: api unlink
brltty: Partial Packet: 50 02
brltty: api link
brltty: checking for speech driver: xs
brltty: initializing speech driver: xs
brltty: pipe fds: fd1 9 10, fd2 11 12
brltty: Opened pipe to external speech program '/home/nico/tts/tts/brl_es_wrapper'
brltty: Speech Driver: xs [ExternalSpeech]
brltty: ExternalSpeech Speech Driver: version 0.8 (September 2004)
brltty: Speech Parameter: program=/home/nico/tts/tts/brl_es_wrapper
brltty: Speech Parameter: uid=
brltty: Speech Parameter: gid=
brltty: setting speech rate: 17
brltty: set rate to 17 (time scale 0.463456)
brltty: mute
brltty: say: "BRLTTY 4.4dev"
brltty: Speech Input: none
brltty: Screen Font Map Size: 545
brltty: VGA Character Count: 512(large)
brltty: attributes masks: font=0100 unshifted=F000 shifted=0E00
brltty: mute
brltty: say: "space"
brltty: spktrk: Received index 0
brltty: spktrk: Received index 0
brltty: spktrk: Received index 5
brltty: spktrk: Done speaking 0
brltty: beeper disabled
brltty: API got key 00 04 (press 1), thus client code 8000000000000004
brltty: API got key 00 03 (press 1), thus client code 8000000000000003
brltty: API got key 00 01 (press 1), thus client code 8000000000000001
brltty: API got command 00400001, thus client code 0000400020000001
brltty: command: 400001 (LNUP: go up one line)
brltty: API got command 0040003d, thus client code 000040002000003d
brltty: command: 40003D (MUTE: stop speaking)
brltty: API got command 00400034, thus client code 0000400020000034
brltty: command: 400034 (PREFMENU: enter/leave preferences menu)
brltty: API got key 00 01 (press 0), thus client code 0000000000000001
brltty: API got key 00 03 (press 0), thus client code 0000000000000003
brltty: API got key 00 04 (press 0), thus client code 0000000000000004
brltty: API got command 00000034, thus client code 0000000020000034
brltty: command: 000034 (PREFMENU: enter/leave preferences menu)
brltty: mute
brltty: say: "Preferences Menu"
brltty: api unlink
brltty: api link
brltty: spktrk: Received index 0
brltty: spktrk: Received index 12
brltty: spktrk: Received index 16
brltty: spktrk: Done speaking 12
brltty: mute
brltty: say: "M"
brltty: spktrk: Received index 0
brltty: mute
brltty: say: "Menu Options: ---> (3)"
brltty: spktrk: Received index 0
brltty: spktrk: Received index 5
brltty: spktrk: Received index 14
brltty: spktrk: Received index 19
brltty: spktrk: Received index 22
brltty: spktrk: Done speaking 19
brltty: API got key 01 10 (press 1), thus client code 8000000000000110
brltty: API got command 00400110, thus client code 0000400020010010
brltty: command: 400110 (ROUTE: bring cursor to character #17)
brltty: API got key 01 10 (press 0), thus client code 0000000000000110
brltty: API got command 00000110, thus client code 0000000020010010
brltty: command: 000110 (ROUTE: bring cursor to character #17)
brltty: mute
brltty: say: "<---    "
brltty: spktrk: Received index 0
brltty: spktrk: Received index 8
brltty: spktrk: Done speaking 0
brltty: API got key 00 06 (press 1), thus client code 8000000000000006
brltty: API got command 00400002, thus client code 0000400020000002
brltty: command: 400002 (LNDN: go down one line)
brltty: API got key 00 06 (press 0), thus client code 0000000000000006
brltty: API got command 00000002, thus client code 0000000020000002
brltty: command: 000002 (LNDN: go down one line)
brltty: cursor tracking: scr=66 csr=[0,0]->[0,1] win=[0,0]->[0,1]
brltty: mute
brltty: say: "Save on Exit: Yes     "
brltty: spktrk: Received index 0
brltty: spktrk: Received index 5
brltty: spktrk: Received index 8
brltty: spktrk: Received index 22
brltty: spktrk: Done speaking 8
brltty: API got key 00 06 (press 1), thus client code 8000000000000006
brltty: API got command 00400002, thus client code 0000400020000002
brltty: command: 400002 (LNDN: go down one line)
brltty: API got key 00 06 (press 0), thus client code 0000000000000006
brltty: API got command 00000002, thus client code 0000000020000002
brltty: command: 000002 (LNDN: go down one line)
brltty: cursor tracking: scr=66 csr=[0,1]->[0,2] win=[0,1]->[0,2]
brltty: mute
brltty: say: "Show All Items: Yes   "
brltty: spktrk: Received index 0
brltty: spktrk: Received index 5
brltty: spktrk: Received index 9
brltty: spktrk: Received index 22
brltty: spktrk: Done speaking 9
brltty: API got key 00 06 (press 1), thus client code 8000000000000006
brltty: API got command 00400002, thus client code 0000400020000002
brltty: command: 400002 (LNDN: go down one line)
brltty: API got key 00 06 (press 0), thus client code 0000000000000006
brltty: API got command 00000002, thus client code 0000000020000002
brltty: command: 000002 (LNDN: go down one line)
brltty: cursor tracking: scr=66 csr=[0,2]->[0,3] win=[0,2]->[0,3]
brltty: mute
brltty: say: "Show Submenu Sizes: Ye"
brltty: spktrk: Received index 0
brltty: mute
brltty: say: "Show Submenu Sizes: Yes"
brltty: spktrk: Received index 0
brltty: spktrk: Received index 5
brltty: spktrk: Received index 13
brltty: spktrk: Received index 23
brltty: spktrk: Done speaking 13
brltty: mute
brltty: ExternalSpeech: ExternalSpeech: pipe to helper program was broken
brltty: api unlink
brltty: api link
brltty: api unlink
brltty: beeper enabled
brltty: tone: msec=60 note=64
brltty: tone: msec=60 note=57
brltty: console closed: fd=4
brltty: screen closed: fd=3
brltty: beeper disabled


More information about the BRLTTY mailing list