This post walks through installing the screen-reader
and configuring it to use
This assumes you have successfully installed a stock OpenBSD system and that your user has doas access to install software.
Install required packages
First, install the requisite packages from the repos:
$ doas pkg_add speech-dispatcher espeak fliteThe
flitepackage is optional, but can provide you with an alternate set of voices.
isn't available as an OpenBSD package,
but it's fairly easy to install.
You should be able to obtain
where they also provide
access to the source-code
In case you want to check against the version 0.6.9 used here:
$ cd $ mkdir tmp $ cd tmp $ ftp http://prdownloads.sourceforge.net/yasr/yasr-0.6.9.tar.gz $ sha256 http://prdownloads.sourceforge.net/yasr/yasr-0.6.9.tar.gz SHA256 (yasr-0.6.9.tar.gz) = 41f17cfab8e88824a8dc1476602a0944b9030a8f8da2538a7a6549e3534e3bdfand to build it
$ tar xzf yasr-0.6.9.tar.gz $ cd yasr-0.6.9 $ ./configure && makeAt some point, hopefully
yasrwill be in the package repositories, making it as easy as pkg_add yasr.
Ensure that sound works
If you haven't already, make sure that your OpenBSD box can play audio. You can check this by using
$ aucat -i somefile.wavIf you don't have any
.wavfiles on your machine,
aucat -i /usr/local/share/sounds/speech-dispatcher/test.wavshould play a short flourish. If it is too quiet, use
mixerctlto set the volume or try additional OpenBSD audio troubleshooting techniques.
To create a user configuration file in
$ spd-confwith the default output of "espeak" (you can later try changing this to "flite" but I leave that as an exercise for the reader) and output via
libao. You can also set the default output speed. I prefer it a little faster than the default but it might be good to start with the default and then tune it later. As you configure, it should offer you the option to run some tests. If you choose "yes" for the first test, you should hear "Speech dispatcher works." I recommend skipping the other tests. With this in place, you should now have a
~/.config/speech-dispatcher/directory with various configuration settings within.
to listen on an inet socket
rather than a
so edit the config file with your favorite text editor
and uncomment/change the CommunicationMethod from
$ ed ~/.config/speech-dispatcher/speechd.conf /CommunicationMethod.*unix_socket a CommunicationMethod "inet_socket" . wqThis does open a local port (6560) allowing other processes on the same machine to connect to
speech-dispatcherjust so you're aware. If you choose to change the port, just make sure to also change it in the
Copy the default
configuration file for modification:
$ cp ~/tmp/yasr-0.6.9/yasr.conf ~/.yasr.confMake the following changes:
Comment out all the
synthesizer=…lines except the
synthesizer=speech dispatcherline, uncommenting that one
shell=…to your preferred shell. OpenBSD doesn't install
/bin/bashso you'll either want to use
/bin/kshor, if you have
/usr/local/bin/bashor your preferred default shell.
yasrin here, but for now, leave the defaults.
It took me a bit to figure out that
listens for a connection but times-out
(by default, 5 seconds)
and then quits.
So you need to invoke it and then immediately launch
$ speech-dispatcher && ~/tmp/yasr-0.6.9/yasr/yasrIf all is working successfully it should start
yasrand you should hear it read your prompt.
Getting started with
file lists all of the keyboard commands
for both normal/interactive mode
and for review mode.
Keys are given by ASCII value written in hex.
|Hex value(s)||Keyboard command||Action|
|0x1b65||Alt+e||read cursor to bottom|
|0x1b72||Alt+r||toggle review mode|
|0x1b74||Alt+t||read top to cursor|
When you enter review-mode,
commands go to
directly instead of being passed to the application.
|Hex value(s)||Keyboard command||Action|
|0x20||space||say review cursor|
|0x24||$||end of line|
|0x5e||^||beginning of line|
|0x65||e||read cursor to bottom|
|0x74||t||read top to cursor|
|0x1b5b41||Up arrow||say line:-1:1|
|0x1b5b42||Down arrow||say line:1:1|
|0x1b5b44||Left arrow||say character:-1|
|0x1b5b43||Right arrow||say character:1|
I'm not quite sure what several of those do, but feel free to experiment with them.
From here, you can tweak your
keyboard commands in your
or change your
settings in your
You might copy/link the
binary into some place on your
$ mkdir ~/bin $ ln -s ~/tmp/yasr-0.6.9/yasr/yasr ~/bin
If you're feeling adventuous and prefer
you might try configuring
to use that instead.
Finally, it helps to have a suite of applications that play nicely with text-to-speech output. A few you might want to try:
- Local mail:
- Remote mail:
s-nail(available as a package)
remind(available as a package)
lynx(available as a package) or
edbrowse(not currently available as a package)
newsboat(both available as as packages)
ii(available as a package) or
tinyirc(not currently available as a package)
- Task management:
devtodo(both available as as packages)
mpd/mpc(both available as as packages)
- Terminal multiplexing:
screen(available as packages) It helps to either hide the status-bar or remove the clock so that it doesn't constantly spam you with time updates
- bsdgames collection
frotzinterpreter for Infocom-style text adventures