Since I've been fighting with this for a while, I thought I would post the method that I used to get Speakup running on Ubuntu server edition. This should work on the desktop version as well, but I have no idea what packages may be already installed and whatnot.
For a quick background, Ubuntu is a Linux operating system based on Debian. I use it frequently as a server OS (this blog is hosted on a computer running Ubuntu). I also have a virtual machine with Ubuntu on my Windows laptop, so I have access to Linux tools whenever I need them. I tend to use the server edition of Ubuntu exclusively, since it uses the command line interface by default, and it comes with significantly less packages by default compared to the desktop version of Ubuntu (you can always just install whatever tools you need). Speakup is a screen reader that runs on the Linux command line, and allows blind people to interact with their computer by verbalizing text on screen using synthesized speech. For people that are more familiar with accessible technology on Windows, Speakup is equivalent to Jaws for the Linux command line.
For a while, Speakup was broken, and wouldn't run due to changes in the kernel (I think). If you have no idea what the kernel is, don't worry about it; just know that speakup didn't work, but at time of writing, now it does. For this tutorial, I'm assuming that you have Ubuntu 13.10 or newer installed and running on a computer, or within a virtual machine. If you are running within a virtual machine, insure that it has a simulated soundcard (that was the cause of so many of my problems until I thought to double-check that a soundcard was present).
The first step is to install alsa. Alsa is a program that allows your OS to play sound. Start by running this command to download and install the program:
sudo aptitude install alsa-tools
Next, add your username to the audio group. Without being part of the audio group, you will not be able to play sound. In the line below, replace the username "sean" with your username:
sudo adduser sean audio Once you've done that, log out and back in so the changes will take effect.
I strongly suggest that you now test to make sure alsa works. There are two commands that you will need, the first one will actually play a sound through your speakers (it may be loud, beware), and the second will allow you to adjust the volume. To play pink noise through your speakers, run the following command (press control+c to stop the program and noise):
speaker-test To adjust the volume, run the following command, pressing control+c to exit the program when you're done. Adjust the sliders using the up and down arrows, and move between the sliders with the left and right arrows:
alsa-mixer Another way to verify that alsa is configured is to list the /proc/asound directory, with the following command. If you get an error that the directory does not exist, alsa is not detecting your soundcard, so it's time to start Googleing in the hope that you can find a fix:
Right, so I'm assuming that alsa is working on your computer. Next, install the package espeakup, which will allow Speakup to work with a software synthesizer:
sudo aptitude install espeakup You can verify that it installed correctly by giving it some test text to speak:
espeak "this is a test." If you hear a voice say "this is a test," it wasn't a daemon; that was supposed to happen, so you can put down your crucifix now. Let's move on to actually starting Speakup.
Run the command to load the Speakup module:
sudo modprobe speakup_soft start=1 And finally, start the espeak service so Speakup can actually talk:
sudo service espeakup start At this point, you should have Speakup talking to you. I'm not going to go over how to actually use Speakup in this blog entry, but you can go read the Speakup manual.
Congratulations, you now have Speakup running on your Ubuntu system. If you followed the above steps, Speakup is running right now, but if you restart or shutdown your computer, Speakup will not automatically start (and you will have to run the "sudo modprobe speakupsoft start=1" command again). To get Speakup to start automatically, edit /etc/modules and add "speakupsoft start=1" on an empty line at the bottom of the file (without the quotes).
sudo nano /etc/modules At the bottom, on a blank line, add:
speakup_soft start=1 Exit nano with control+x, then press Y to save changes, and press enter to accept the name. Now you can restart without fear.
I hope that this will help someone, including myself when I forget how to do this in six months. As always, these instructions may not work for you because of changes to Ubuntu, changes to one of the packages that we installed, a typo on my part (feel free to contact me for that one), hardware not working, or gremlins.