HOWTO setup emacspeak on Slackware by Klaatu klaatu@member.fsf.org This HOWTO covers setting up and configuring emacspeak on Slackware GNU Linux. It assumes that you are familiar with either Slackware or *nix in general. Note that the author is sighted, so these instructions may not be optimized for a blind user. This file is screen-reader friendly, however. 1. Install Slackware (if you're reading this, you probably already have done this step). Note that the first screen during a Slackware install asks you what kernel you'd like to use, giving up the option of the speakup.s kernel. This kernel enables support for hardware-based screenreaders. This HOWTO covers only how to install emacspeak for a software-based solution, meaning that the user will not need a hardware speech synthesizer; the computer's internal sound card will generate speech. Therefore, you will not need to choose the speakup.s kernel (although you may if you prefer; it doesn't hurt to have it). 2. After installation, log in as root and create a user. Make sure this user is included in the audio group. 3. Insert the install dvd in your computer's optical drive. Mount it and go into the /extra directory there: bash$ su -c 'mount /dev/cdrom /media/cdrom' enter root password bash$ cd /media/cdrom/extra 4. Install emacspeak: bash$ su -c 'installpkg installpkg /media/cdrom/emacspeak/emacseak.x.x.x.tgz' enter root password 5. Technically speaking, at this point emacspeak is installed -- but it is not by any means configured. Still, you can test that emacspeak is installed by typing in "emacspeak" at a bash prompt; emacs will start and return some errors in its buffer related to the lack of a proper configuration. Press control-x control-c to exit emacspeak. 6. Now you must install a speech synthesizer. While many software-based speech synthesizers are mentioned in (generally outdated) online documentation, there is one that is current and works well with emacspeak: Flite. Find the source code for this at http://www.speech.cs.cmu.edu/flite/packed/flite-1.3/flite-1.3-release.tar.gz 7. Now a software speech synthesizer installed. The next step is to configure a "sound server" -- which is basically the intermediary link between emacspeak and the software speech synthesizer. Without a sound server, you would simply have emacspeak installed and the Flite screenreader voice installed, with no way for them to ever make use of each other. 8. The sound server required is eflite. Download its source code from http://eflite.sourceforge.net Eflite should automatically detect your flite libraries and include files. If not, you can manually define where these are with configure options. 9. After 'make' has finished, do not run 'make install'; first, test eflite: bash$ make test You should hear a voice confirming that eflite is working properly. If you hear nothing, do not install it until you diagnose and repair the problem. If eflite compiled successfully, then you probably do have flite installed correctly; a likely problem is that ALSA is not working or is muted or your pc speakers are not being recognized. Both are beyond the scope of this HOWTO, but you should establish that your speakers are being recognized, working, and that the volume is not muted. A good place to start with this might be alsamixer and lsmod. To test flite itself: bash$ flite -t foobar which should cause your computer to say the word "foobar". 10. Assuming the test is successful, install eflite: bash$ su -c 'make install' 11. Now emacspeak is installed, a speech synthesizer is installed, and a speech server is installed. The next step is to configure it all to work together. bash$ DTK_PROGRAM=/usr/local/bin/eflite bash$ export DTK_PROGRAM bash$ emacspeak At this point, you should hear emacs being narrated to you. 12. If this is not working for you but all the tests up to this point have worked for you, then you are not configuring something correctly. Most likely, emacspeak is not using the correct sound server, because up to this point you have launched emacspeak successfully and you have tested flite and eflite successfully. It is important that the DTK_PROGRAM variable is set so that emacspeak knows what sound server to send information to. To set this variable properly, you must, within THE SAME BASH SHELL, do exactly this...without closing or changing to a new shell: bash$ DTK_PROGRAM=/usr/local/bin/eflite bash$ export DTK_PROGRAM bash$ emacspeak If you change shells or close that shell between setting DTK_PROGRAM and launching emacspeak, you lose the variable setting and you are launching emacspeak without it knowing what sound server to use. You can test to see that this variable is set by running 'echo $DTK_PROGRAM' just before launching emacspeak. If it returns "/usr/bin/eflite" then the variable is set correctly. 13. Now that you have established that everything works as expected, you should add the variable setting to .bash_profile: bash$ echo "DTK_PROGRAM=/usr/bin/eflite; export DTK_PROGRAM > ~/.bash_profile" 14. Log out and log back in and type 'echo $DTK_PROGRAM'. If it returns "/usr/bin/eflite" then the .bash_profile is working. Launch emacspeak by typing in "emacspeak" at the bash prompt, and emacs with emacspeak functionality should launch, and you should hear it narrate to you as expected. Optional hacks dreamt up by the author: 15. If the emacspeak system is for a blind user, there are two useful modifications to the system that can be made to help usability. As it is now, when the system boots, it runs through the usual launch sequence and then sits silently at a login prompt waiting for the user to enter their information. Notification the the boot sequence has ended and the login prompt is available would be helpful to a non-sighted user. Also, after login, a user will be expected to type in 'emacspeak' to start emacspeak, which is tedious since emacspeak is intended to be their OS. Thus, automatically launching emacspeak will be helpful. To create an audible login prompt, you can modify a startup script such that some command is initiated at the end of the boot sequence. As root: bash# echo 'exec /usr/bin/flite -t "please log in."' >> /etc/rc.d/rc.local After a successful login, the user will be dumped to a non-audible bash prompt. After a failed login, the user will be dumped to a non-audible login prompt. The two processes are indistinguishable to a non-sighted user, which obviously reduces usability. Having emacspeak automatically launch after a successful login, therefore, will provide audio cues that the login was successful as well as eliminating the redundancy of manually launching emacspeak every time the user logs into the system. To implement this: bash$ echo 'exec /usr/bin/emacspeak' >> ~/.bash_profile This way, if the user opens a new bash shell, then emacspeak is automatically started within that shell. [EOF]