Using bash to call "Say" command

Discussion in 'Mac OS X Server, Xserve, and Networking' started by thiagosnow, Sep 29, 2013.

  1. thiagosnow, Sep 29, 2013
    Last edited by a moderator: Sep 29, 2013

    macrumors newbie

    Sep 9, 2013
    Hi guys.
    Im in the middle of a project for Home Automation where I need my browser to call the command "say" on the terminal. I got everything working but the voice doesnt come with the command, it only displays the content of the file I called.

    Here is what i've done so far:

    Installed OS X Server 10.8.5 for Mountain Lion (I heard that Apple changed a few things for the server for ML)
    I have my machine as
    I created a file "testhttp" with 755 permission with this content:
    echo -e "Content-type: text/html\n"
    cat << junk
    say -v vicki "i am issy hear me roar"
    cat << junk
    The file is placed on the folder /library/webserver/cgi-executables (I used the aliases to create a "cgi-bin" to access "cgi-executables".

    So when I call the file using ./testhttp on terminal, I get the content displayed plus a voice from my speakers, but when I call it from any browser using :

    I only get the content displayed, but no voice ...

    Im assuming its something related to the changes apple did for Mountain Lion because on Lion I had that working no problem ...

    Please guys, help me out with that once Im getting really frustrated !

    Take Care and thanks in advance!

Share This Page