Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Adding Speakable Commands to an APP

Adding Speakable Commands to an APP
Thread Tools
snitty
Fresh-Faced Recruit
Join Date: Sep 2000
Location: Niskayuna, NY USA
Status: Offline
Reply With Quote
Jul 19, 2001, 07:34 PM
 
Hello,

I am trying to make as many apps as I can accept speakable commands, but I can't figure out how to add a speakable command to an Application, can anyone help?

PS I know a fail amount of applescript
-----------------------------
Ben Snitkoff
"Time is an illusion, lunchtime doubly so"
--Douglas Adams R.I.P.
     
Paul Crawford
Dedicated MacNNer
Join Date: Nov 1999
Location: Georgetown, Demerara, Guyana
Status: Offline
Reply With Quote
Sep 15, 2001, 11:08 PM
 
Hi,

If you're running a recent version of Mac OS Classic (9.x), there's usually a subsection of Mac Help that describes how to create your own speakable items for an application. For example, under Mac OS 9.1, you could open Mac Help from the Finder and navigate to the 'Speech | Using spoken commands to work with your computer | (Related Topics) Creating your own commands' subsection.

I don't know too much about this stuff myself, but I'll try to provide an overview here, based on the information in Mac Help and other online sources such as Apple and Macworld:-

Apparently, once you've installed the Speech Recognition package via the Mac OS Installer, any application (whether scriptable or not) can be made to perform simple speakable tasks such as opening a document, by creating a speakable item in the form of an alias-file pointing to the desired document. E.g., you could place a document alias in the relevant application-specific subfolder within the Application Speakable Items subfolder of the Speakable Items subfolder of the System Folder's Apple Menu Items subfolder. Then, when the app is frontmost, you should be able to speak the alias-file's name in order to open the document.

If the app is scriptable, you could also create a speakable item in the form of an AppleScript applet to carry out any of the app's scriptable tasks. (Some example applets are available in the Outlook Express subfolder of the Application Speakable Items subfolder mentioned above.) In addition, under Mac OS 9.x, an applet can target the scriptable Speech Listener application (in the System Folder's Scripting Additions subfolder) to listen for arbitrary spoken commands to which the applet could then respond.

Furthermore, a speakable item can itself be a regular application too; as you know, several such mini-apps or "speechlets" (with creator-code 'spt2') are installed with Mac OS 9.x. Armed with an IDE such as CodeWarrior, you could write your own custom speechlets to do whatever you wanted, including "hooking into" the frontmost app to control it in various ways.
For the developer, there are other powerful mechanisms for adding sppech-recognition capabilities to an application, via Apple Event handlers or special speech-recognition callback routines. These are useful if you plan on writing your own speech-aware applications, or perhaps directly controlling other speech-aware applications.

A comprehensive survey of the Mac's built-in speech recognition capabilities, as well as third-party dictation software, is provided by Macworld's May 2000 article Listen Up. For hands-on development involving Mac OS Classic's Speech Recognition Manager APIs, full documentation and sample code are available via Apple's Speech Recognition Manager SDK.

Regards,

--Paul
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:36 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,