Remote Speech

Discussion in 'Mac Programming' started by simplebeep, Sep 28, 2008.

  1. simplebeep macrumors member


    Sep 28, 2007
    Hello all. I am using AppleScript Studio to write an application that speaks text. I want to be able to get the application to speak on a remote computer, even if only on a local network, over Remote Apple Events.

    I have been somewhat successful, in that, on my Leopard computer, I can speak to another Leopard computer; and I have built a preliminary "release" version, ran it on Tiger, and it could speak to my Leopard computer. But, no matter what I try, I cannot speak to a Tiger computer. :confused: All parties involved have Remote Apple Events sharing turned on.

    Here's the code, in part (given the machine address, theAddress (e.g. eppc://compy.local); the text to speak, mrSay; and the voice to speak it with, mrVoice):

    using terms from application "Finder"
        tell application "Finder" of machine theAddress			
                say mrSay using mrVoice
            on error
                say mrSay
            end try  [I]--Since mrVoice is user-defined, this is a simple failsafe.[/I]
        end tell
    end using terms from
    The code works, as I have said, but when I try to speak to a Tiger computer, I get the error
    Finder got an error: "Text To Speak" doesn’t understand the «event sysottos» message. (-1708)​

    Thanks in advance for any help/workarounds.
    By the way, I want to avoid ssh solutions, and stick to the AppleScript.
  2. foidulus macrumors 6502a

    Jan 15, 2007
    Just for debugging purposes

    I would try to launch it on Tiger and have it speak to itself(ie enter the address in as and see if that works. May help to narrow down the problem.
  3. simplebeep thread starter macrumors member


    Sep 28, 2007
    It worked… sort of.

    Thank you, foidulus. Your question led to the solution.

    First, I ran the application on the Tiger computer, and tried to get it to remotely speak to itself; first, I entered the Bonjour name (hal.local), and the app just beachballed, without any official error message. Then, I looked up the IP address of the computer (, entered that, and then it could speak to itself no-problem.

    Finally, I tried speaking to the Tiger computer from Leopard with the IP, which I had not previously done. Amazingly, it worked! :D Apparently, the actual numerical address is necessary.

    But that leads me to a new (albeit less critical) question: How can I get it to work with the hal.local-type address?

Share This Page