Skip navigation

Speech Recognition Server Fix?

958 Views 6 Replies Latest reply: May 2, 2012 7:20 PM by greenyouse RSS
greenyouse Level 1 Level 1 (30 points)
Currently Being Moderated
Apr 30, 2012 9:52 PM

Hi, I was writing a few AppleScripts with speech commands (in Snow Leopard) but I ran into errors with my Speech Recognition Server application.  I know that this is a pretty old subject but were there ever any workarounds released to solve the issue?

MacBook, Mac OS X (10.6.8)
  • Camelot Level 8 Level 8 (45,670 points)
    Currently Being Moderated
    May 1, 2012 12:39 AM (in response to greenyouse)

    Kind of hard to answer your question without more details - what kind of errors are you getting?

     

    Speech Recognition is still supported in 10.7, so there's little reason why it wouldn't work, but without knowing what kind of issues you're running into, it's hard to tell you what needs to change.

  • twtwtw Level 5 Level 5 (4,580 points)
    Currently Being Moderated
    May 1, 2012 1:31 PM (in response to greenyouse)

    two things:

     

    first, try not to put osax-based commands inside of application tells.  'say' is a command in the standard additions osax, and is not guranteed to work when called in  any context other than the main script context.  rewrite like so:

     

    tell application "SpeechRecognitionServer"

              set theResponse to listen for {"yes", "no"} with prompt "Hello. Do you like me?"

    end tell

     

    if theResponse is "yes" then

              say "I like you, too."

    else

              say "I don't care whether you like me or not."

    end if

     

    second, and more to the point, you need to hold down the escape key (by default) to get the speech recognition server to listen.  you'll know it's listening because the microphone will go from gray to black and moving arrows will appear pointing in at the mic.

  • twtwtw Level 5 Level 5 (4,580 points)
    Currently Being Moderated
    May 2, 2012 9:24 AM (in response to greenyouse)

    On my machine it works on alternate runs, and I set a 'getComponentVersion failed' error in console.  Apparently the speech recognition server is hanging after processing a command.  probably needs a bug report to apple.  you can solve the problem hackishly by adding the following line at the end of the script:

     

    do shell script "killall SpeechRecognitionServer"

     

    this kills the server immediately, letting the script run next invocation.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.