Team LiB   Previous Section   Next Section

Chapter 30. Speech Listener and SpeakableItems Extension

Mac OS 9 offers three different ways to use AppleScript to control how the computer responds to verbal commands and "speaks" back to the computer user. Using combinations of these methods, you can create complex and useful speech-related scripts:

  • The listen for AppleScript command, which controls the computer's response to spoken commands. The options that control how the computer listens for commands, such as the key on your keyboard that will toggle this technology on and off, can be controlled with the Speech control panel (see Figure 30-1).

Figure 30-1. The Speech control panel
figs/ascr_3001.gif
  • The SpeakableItems technology allows the user to execute a script inside the SpeakableItems folder (which is located in the startup disk:System Folder:Apple Menu Items folder) just by speaking the script's filename into the computer's microphone.

  • The say command, a scripting addition that has been part of the Standard Additions osax since Mac OS 8.5 (See Appendix A). As long as the Speech Manager extension is enabled, the computer will speak any text or string that you specify in an AppleScript with say, as in:

say "It's nice to hear text rather than read it sometimes."

Figure 30-2 shows the three extensions that have to be installed with Mac OS 9 to use the three speech-related technologies with AppleScript.

Figure 30-2. Speech extension files
figs/ascr_3002.gif
    Team LiB   Previous Section   Next Section