• 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
Re: Speakable Item and SpeechRecognitionServer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speakable Item and SpeechRecognitionServer


  • Subject: Re: Speakable Item and SpeechRecognitionServer
  • From: Bruce Robertson <email@hidden>
  • Date: Sat, 19 Sep 2009 11:22:57 -0700
  • Thread-topic: Speakable Item and SpeechRecognitionServer

> 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

  • Follow-Ups:
    • Re: Speakable Item and SpeechRecognitionServer
      • From: DigitEL <email@hidden>
    • Re: Speakable Item and SpeechRecognitionServer
      • From: Peter Baxter <email@hidden>
References: 
 >Re: Speakable Item and SpeechRecognitionServer (From: Peter Baxter <email@hidden>)

  • Prev by Date: Sending from Mail
  • Next by Date: Re: Speakable Item and SpeechRecognitionServer
  • Previous by thread: Re: Speakable Item and SpeechRecognitionServer
  • Next by thread: Re: Speakable Item and SpeechRecognitionServer
  • Index(es):
    • Date
    • Thread