Tom's screen-reader

Tom's screen reader
Login

The present package provides an executable (tsh) that forwards commands to a shell and voices the results with espeak, along with several other utilities for interacting with a console without a screen.

tsh

You can run the shell forwarded like this.

tsh

Specify the forwarded shell like this.

env SHELL=/usr/local/bin/tcsh tsh

tsh needs a shell to forward commands to, so I do not allow it to act formally as a login shell. To use it as a login shell, spawn it from the "~/.login" file (csh, tcsh) or the "~/.profile" file (ksh, bash). Examples are included in the "rc" directory.

tsh voices the text that appears in the terminal, regardless of whether it is input or output or error. It separates text into two sections:

  1. The current line
  2. Before the current line

Each section has its own speech generator that is configured and controlled separately.

  1. Text in the current line is voiced from the beginning of the line to the last space in the line. When a new line is started, any text in the line that has not yet been voiced (because the text was entered faster than the speech was be generated) is ignored, and the voicing begins at the new line.
  2. Text before the current line is voiced from the beginning of the file to the last newline. It is has no reset mechanism like that for text in the current line.

tsh starts voicing output every time a new line is printed on the screen, and it stops when the shell is closed or when SIGUSR1 is sent to the process identified in the TSH_PID environment variable. (Also, as mentioned above, the voicing of just the current line stops when a new line is started.)

Files

The "rc" files are recommended shell configurations.

Install

Ensure that dependencies are installed.

pkg_add espeak python%3.6 # OpenBSD
sbopkg -i espeak -i python3

Check out the source code.

fossil clone https://thomaslevine.com/scm/tsh tsh.fossil
mkdir tsh
cd tsh
fossil open ../tsh.fossil

Install.

make install

The above command installs system-wide; this one installs just in your user home.

make install PREFIX="${HOME}"

You can also just run it from the source code repository.

./bin/tsh