Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Text to Speech with a Mac


umbex

Question

Hi all, this is my first message here.

I have an old Mac Mini as a mediacenter.

I'm just configured it as a speech device to announce relevant dynamic messages.

And it works! On the Mac, configure the speech voice according to your language, on the system preferences panel.

Then you need to:

1. Enable the apache webserver on your mac (this depends on your OS).

Search more info

Please login or register to see this link.

2. Enable php scripting

Search more info

Please login or register to see this link.

3. create a new php file on your webserver root folder (i.e. Macintosh HD/Library/WebServer/Documents/ )

This is a sample file voice.php:

Please login or register to see this code.

4. Create a virtual device with the IP and port of your Mac's webserver

You can send a string:

Please login or register to see this code.

or use a LUA script:

Please login or register to see this code.

I'm now playing with this in various ways.

Hope you enjoy it.

[ Added: 2013-11-04, 21:57 ]

In addition, you can play an audio fx file with as similar approach:

on the mac the player.php file:

Please login or register to see this code.

on fibaro virtual device the string:

Please login or register to see this code.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Super - You are a genius

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />))

Have to test asap.

[ Dodano: 2013-11-04, 23:51 ]

tried on Macbookair with Maveric and doesn't work. Appache is working - tried both ways but no results ?-)

On one system I have result = "...voice.php …parsing error in line 6 …"

On the other system (iMac) no result at all

Please login or register to see this image.

/emoticons/default_icon_sad.gif" alt=":-(" />

OK get it working on iMac (Mountain Lion)

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" /> had a wrong extention for voice -> php.txt as I have used a text editor to create it …

Still a problem on Maverick - parsing error on line with shell_exec()

Also basic echo "hello" displays: @hallo@ …?

Maybe some problem with PHP and Apache on Maverick ?-)

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hi richo,

    first, let's see if you can use the "say" from command line: open Terminal.app and type "say hello". If this works, you should look carefully at syntax errors in the php file.

    I'm using it on snow leopard and maverick and it works fine.

    bye

    [ Added: 2013-11-06, 01:21 ]

    Have you activated php on Maverick?

    Super - You are a genius

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" />))

    Still a problem on Maverick - parsing error on line with shell_exec()

    Also basic echo "hello" displays: @hallo@ …?

    Maybe some problem with PHP and Apache on Maverick ?-)

    Link to comment
    Share on other sites

    • 0

    Hi,

    PHP works as i.ex. I can see the phpinfo(), it just have a problem with parsing even standard quotes !?

    Maybe I have messed something with apache server on Maverick.

    Need to reinstall all files...

    I also have an old ATV 1 and wonder if after jailbraking it would work the same?

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...