Re: Speakable Item and SpeechRecognitionServer
Re: Speakable Item and SpeechRecognitionServer
- Subject: Re: Speakable Item and SpeechRecognitionServer
- From: Peter Baxter <email@hidden>
- Date: Sun, 20 Sep 2009 06:33:40 +1000
When you run that script, you get an error
"Apple event timed out"
you will need to set the timeout for the apple event to a longer than
usual period.
On 20/09/2009, at 4:22 AM, Bruce Robertson wrote:
Hi Bruce,
Speakable items has always been unable to recognise the Australian
accent so
this would be a waste of time working on it. Do you have speakable
items set
up and set to listen?
Peter Baxter
Director of Music
Ararat College
Victoria
Australia
Yes, speakable items is on.
Maybe somebody can post a script that actually works?
I modified the script from the previously linked page, the script
now looks
like this. It does respond to the correct triggering utterance but
only
gets as far as say "Listening now"
-- start script
property commandList : {{commands:{"good morning"}, code:"turn on
\"Coffee
Maker\""}, ¬
{commands:{"going outside"}, code:"turn off \"Living Room Lamp\""}}
set speechCommands to {}
repeat with thisCommand in commandList
set speechCommands to speechCommands & commands of thisCommand
end repeat
beep
set timePeriod to 10
say "beep"
-- Try to get SpeechRecognitionServer to be recognised as an
application
application ((path to library folder from system domain as Unicode
text) ¬
&
"Frameworks:Carbon.framework:Versions:A:Frameworks:SpeechRecognition.framewo
rk:Versions:A:Resources:SpeechRecognitionServer.app")
say "Listening now"
--repeat
tell application "SpeechRecognitionServer"
try
say "Listening then"
set chosenCommand to listen for speechCommands with prompt
"Choose
an option [[emph +]]" giving up after timePeriod
if chosenCommand is "quit" then
quit
else
repeat with thisCommand in commandList
if chosenCommand is in commands of thisCommand then
using terms from application "Finder"
tell application "Finder"
say thisCommand
end tell
end using terms from
exit repeat
end if
end repeat
end if
on error errmsg
beep
tell application "Finder" to display dialog errmsg
end try
end tell
-- end repeat
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden