• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Listen For command and Escape key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Listen For command and Escape key


  • Subject: Listen For command and Escape key
  • From: Bill Cheeseman <email@hidden>
  • Date: Sat, 18 Mar 2006 18:11:29 -0500
  • Thread-topic: Listen For command and Escape key

Since my last post about speech in AppleScript generated so much enthusiasm,
I've got another.

The default Listening Key in the Speech Recognition pane of the Speech
preference pane of System Preferences is the Escape key.

When you turn on Speakable Items and use the Listen For command in the
SpeechRecognitionServer application in a script, you have to hold down the
Escape key for a moment before you start speaking, in order to make the
speech recognition engine pay attention.

Unfortunately, at least in recent versions, holding the Escape key down
causes the Listen For command to exit with an error to the effect that the
user interrupted the script while waiting for a response -- or, sometimes, I
just get a series of angry beeps. This appears to be the result of
AppleScript interpreting the Escape key as a keyboard equivalent for a
cancel operation. If you change the default Listening Key to something else,
say F5, the problem goes away.

I don't recall having this problem with the Escape key in the old days. It
seems to me that either the problem with the Escape key should be fixed, or
the default Listening Key for speech recognition should be changed. I would
prefer changing the default, since the Escape key has unfortunate
connotations and conflicts.

Any thoughts?

Here's a convenient test script:

tell application "SpeechRecognitionServer"
     listen for {"buttered popcorn", "steak tartar"} ¬
          with prompt "What do you want for dinner?"
end tell
say the result & " it is!"

Don't forget to turn on speech recognition.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Listen For command and Escape key
      • From: Christopher Nebel <email@hidden>
    • Re: Listen For command and Escape key
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Say command using "Organ" doesn't work
  • Next by Date: Re: Listen For command and Escape key
  • Previous by thread: [AS] extended chars & Image Events
  • Next by thread: Re: Listen For command and Escape key
  • Index(es):
    • Date
    • Thread