This blog post comes from Paivy a Cepstral customer who generously devoted time and energy to put together this and several other tutorials on Cepstral and Linux screen readers.
This tutorial will demonstrate how to setup one or more Cepstral voices for use with the Orca Screen Reader on a Ubuntu 14 or Ubuntu 15 system running the Ubuntu GNOME Desktop Environment. The tutorial assumes that you have (1) internet access, and (2) a full Ubuntu 15 GNOME Desktop installation.
1. If you have not already done so, enable the Canonical Repository. Go to “Software & Updates,” select “Other Software Sources,” and ensure that the check box next to the first item labeled “Canonical Partners” is checked. Next, select “Close,” and if prompted to update software package information, do so by selecting “Reload.”
2. Download the desired voice(s) from the Cepstral website. (You may need to submit a support ticket prior to being able to do this.) In the Nautilus file manager, go to the directory in which you downloaded the voice(s), and extract each voice archive by right-clicking the file and selecting “Extract Here.” Take note of the new folders that are created after the extraction process. Extracting each archive should result in the creation of a new sub-folder with a name such as “Cepstral_Allison_x86-64-linux_126.96.36.1993.” Each of these sub-folders should contain an “install.sh” script.
3. Open the GNOME Terminal, and use the “cd” command to switch to each sub-folder of the location to which the Cepstral voices were downloaded. Each extracted voice archive should contain an “install.sh” script. To install a Cepstral voice, enter “sudo,” the entire path to an “install.sh” script file, and enter from within a directory of an extracted voice. If everything works, you will be asked to review the Cepstral End-User License Agreement. Press enter to scroll through the agreement. (A note for blind users: if using Orca with the GNOME Terminal, Orca may not read the entire line of text as you scroll through the agreement. To access the End User License Agreement in the file manager, open your file manager and go to the same directory that contains install.sh. The file “eula.txt” contains the End-user License Agreement.)
4. After reaching the end of the agreement, you will be prompted to indicate your acceptance of the agreement by typing “yes” and pressing “enter.” Next, you will be asked where to install the Swift engine. Simply press enter, to select the default location (/opt/swift/.) If this directory does not exist, you will be asked whether or not you wish to create it. Enter “y” and enter if asked. Next, the install.sh script will inform you where it intends to install various files. Accept this installation by entering “yes” and enter when prompted. If the installation was successful, you should see a message indicating that the installation was completed successfully.
5. To install a voice license, open the GNOME Terminal, enter the following command and press enter: “sudo /opt/swift/bin/swift –reg-voice.” You will be asked a series of questions. Enter the information exactly as it appears on your invoice. (If you don’t know which Cepstral voices are installed on your system, you can get a list of every installed voice by opening a terminal, entering “/opt/swift/bin/swift –voices,” and pressing enter.)
6. If installing multiple voices, repeat steps 3, 4 and 5 for each voice that you wish to install.
7. To configure Speech Dispatcher to use the Cepstral voices, use the “sudo nano” command to edit “/etc/speech-dispatcher/speechd.conf” so that the number sign before the line that starts with “AddModule “swift-generic”” is removed. Do this by entering “sudo nano /etc/speech-dispatcher/speechd.conf,” and pressing enter. In the file that appears after you enter your password, use the down arrow key to scroll to the line that starts with “AddModule “swift-generic”.” Delete the “#” at the start of this line. Press F3 and enter to save the file, and then press the control key and X simultaneously to quit nano. You can now close the terminal.
8. If you have (1) a license to produce audio files, and (2) only one Cepstral voice installed, and you wish to control its pitch and rate with Orca, you do not need to edit the “swift-generic” module. However, if you either (1) do not have a license to produce audio files, (2) have multiple Cepstral voices installed and wish to specify which voice to use with Orca, or (3) you wish to remove Orca’s ability to control the speed or pitch of the Cepstral voice that it uses, which may increase voice quality in some situations, you will need to edit the “GenericExecuteSynth” portion of “/etc/speech-dispatcher/modules/swift-generic.conf.” One example way to do this would be to replace the quoted text in the line below “GenericExecuteSynth” with ““echo \’$DATA\’ >/tmp/swift-speak.txt && padsp /opt/swift/bin/swift -p tts/content-type=text/plain,tts/text-encoding=utf-8 -n -f /tmp/swift-speak.txt.”.” (In the previous quoted text, replace “” with the name of the Cepstral Voice that you wish to use.) The “padsp” program redirects OSS output to either PulseAudio or ALSA, which is necessary for the Swift engine to work on systems that are not licensed to produce audio files. To edit the “swift-generic” module, enter the following command followed by enter in a GNOME Terminal window: “sudo nano /etc/speech-dispatcher/modules/swift-generic.conf” In the file that appears after you enter your password, use the down arrow to scroll to the quoted text below the line that begins with “GenericExecuteSynth.” Either replace this text with the example quoted text shown above, or modify it to meet your needs. When you are finished, press F3 and enter to save the “swift-generic.conf” file, and then press the control key and x simultaneously to quit nano. You can now close the terminal.
9. Restart the computer and start Orca by selecting it from the GNOME Shell Application chooser. Once Orca is running, open a GNOME application such as the file manager “nautilus,” and then try to open the Orca Preferences dialog box by pressing either Insert+Space or Caps_Lock+Space, depending on whether Orca is configured to use either the desktop or laptop keyboard layouts. If running Orca for the first time, Orca is configured by default to use the Desktop keyboard layout, meaning that if you have a full keyboard, you should be able to use the Insert+Space command to activate the Orca preferences dialog box. If this is not possible—for example, if you’re running Ubuntu on a laptop–you will need to hold down the right mouse button or pointer from within the GNOME application while pressing space to activate Orca preferences. (Once you successfully access the Orca Preferences dialog box, you can change the keyboard layout under the “General” tab.)
10. When the Orca Preferences dialog box appears, select the “Voice” tab, and then select “swift-generic” from the “Speech Synthesizer” drop-down menu, and click “Apply.” Next, click “OK.” If the Cepstral voice specified in “swift-generic.conf” is licensed, Orca should use it to read the screen. If the specified voice is not licensed, you will hear a message about the voice not being licensed. (If no speech occurs after hitting “Apply” and “OK,” try restarting Orca.)
11. You can test the Swift engine’s ability to synthesize text on the command line by opening a GNOME Terminal window and entering “padsp /opt/swift/bin/swift “ followed by quoted text. To specify that a particular voice be used, enter “-n ” and the name of the Cepstral voice prior to the quoted text–for example, “padsp /opt/swift/bin/swift -n Allison “Hello World.””