10.3 Giving Lion a Voice

Before we can talk to a Mac, we must first enable its speech recognition server. Note that the speech recognition server had been broken on the OS X 10.5 and 10.6 releases and was finally fixed in the 10.7 Lion release. This once again makes the Mac a viable speech recognition platform.

In order to configure the Mac to use its speech recognition capabilities, click on the Speech icon in the System Preferences panel, as shown in Figure 46, Accessing OS X speech settings.

/epubstore/R/M-Riley/Programming-your-home//images/osx-speech.png

Figure 46. Accessing OS X speech settings

Select the Speech Recognition tab and turn on the Speakable Items, as shown in Figure 47, Turn on speakable items.

/epubstore/R/M-Riley/Programming-your-home//images/osx-speakableitems.png

Figure 47. Turn on speakable items.

Read the tips dialog box that is displayed the first time you enable this option and take heed of the recommendations. Speech recognition algorithms are not yet powerful enough to effortlessly understand a variety of dialects, accents, and volume levels, but the technology is getting better all the time.

I find I have to be especially loud and clear when speaking to the Mac, making an effort to slowly enunciate my commands with almost no background noise. You may also need to play around with microphone gain and placement from your mouth as well as acclimate to the cadence for the speech recognizer to work with the vocabulary we’ll be defining in our script. Note that the Mac sets the Microphone setting to use the Internal Microphone by default. We will revisit this setting later when we change this to use the iMic adapter, but it’s okay to leave the setting as it is for now.

When the Speakable Items option is activated, you will see a round microphone graphic appear on your computer’s screen. This is the speech recognizer window. You activate the recognizer by holding down the Escape key on the keyboard. We will remove this keyboard requirement once we have our talking home script running and our wireless microphone set up, but for now we’ll leave it be so that we can more easily debug our script.

Before closing the Speech preference panel, we have one more option to set. Click on the Text to Speech tab (see Figure 48, Text to Speech settings) and select a System Voice from the drop-down list.

/epubstore/R/M-Riley/Programming-your-home//images/osx-speech-tts.png

Figure 48. Text to Speech settings

You can preview voices by clicking the Play button. The default voice is Alex. It’s pretty good, but I prefer the American female voice Samantha. Since the voice files are quite large, Apple doesn’t ship all of the selections with Lion. Instead, you have to obtain them by selecting the Customize... System Voice menu option. Doing so will display the dialog box shown in Figure 49, Lion voice selections, which lists the voices freely available for download from Apple.

/epubstore/R/M-Riley/Programming-your-home//images/osx-voice-customize.png

Figure 49. Lion voice selections

There are plenty of voices to choose from, and you can preview each one before downloading them by clicking the Play button. Once you select a voice that you like, it may take a while to download and configure the selected voice files on your computer, depending on your Internet connection and Mac CPU speed. As an example, the Samantha voice file is over 450 megabytes in size.

Once downloaded and installed, you can further tweak the voice playback by moving the Speaking Rate slider for faster or slower playback. I suggest keeping it on the normal default for now and modifying it if necessary once you have the whole wireless mic rig and speaker system working. Speaking of which, our next task is to get the wireless mic hooked up and calibrated for speech recognition.

Programming Your Home
cover.xhtml
f_0000.html
f_0001.html
f_0002.html
f_0003.html
f_0004.html
f_0005.html
f_0006.html
f_0007.html
f_0008.html
f_0009.html
f_0010.html
f_0011.html
f_0012.html
f_0013.html
f_0014.html
f_0015.html
f_0016.html
f_0017.html
f_0018.html
f_0019.html
f_0020.html
f_0021.html
f_0022.html
f_0023.html
f_0024.html
f_0025.html
f_0026.html
f_0027.html
f_0028.html
f_0029.html
f_0030.html
f_0031.html
f_0032.html
f_0033.html
f_0034.html
f_0035.html
f_0036.html
f_0037.html
f_0038.html
f_0039.html
f_0040.html
f_0041.html
f_0042.html
f_0043.html
f_0044.html
f_0045.html
f_0046.html
f_0047.html
f_0048.html
f_0049.html
f_0050.html
f_0051.html
f_0052.html
f_0053.html
f_0054.html
f_0055.html
f_0056.html
f_0057.html
f_0058.html
f_0059.html
f_0060.html
f_0061.html
f_0062.html
f_0063.html
f_0064.html
f_0065.html
f_0066.html
f_0067.html
f_0068.html
f_0069.html
f_0070.html
f_0071.html
f_0072.html
f_0073.html
f_0074.html
f_0075.html
f_0076.html
f_0077.html
f_0078.html
f_0079.html
f_0080.html
f_0081.html
f_0082.html
f_0083.html
f_0084.html
f_0085.html
f_0086.html
f_0087.html
f_0088.html
f_0089.html
f_0090.html
f_0091.html
f_0092.html
f_0093.html
f_0094.html
f_0095.html
f_0096.html
f_0097.html
f_0098.html
f_0099.html
f_0100.html
f_0101.html
f_0102.html
f_0103.html
f_0104.html
f_0105.html
f_0106.html
f_0107.html
f_0108.html
f_0109.html
f_0110.html
f_0111.html
f_0112.html
f_0113.html
f_0114.html
f_0115.html
f_0116.html
f_0117.html
f_0118.html
f_0119.html
f_0120.html
f_0121.html
f_0122.html
f_0123.html
f_0124.html
f_0125.html