Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Ok, Sunday question :) Trying to make a little joke...

1) if you open a terminal, and type "say -a ?", Mac OS X will give you the list of devices it can send spoken words to. On mine, it says:

39 AirPlay
47 Built-in Output

2) I have a Denon airplay-ready received in my living room and I'm trying to send spoken words to my wife downstairs... I can send music without any problem using iTunes so, from an infrastructure standpoint, I'm all set.

3) I want my computer to say (out of the blue) "Honey, why don't you bring me a cup of coffee". I can make it say that locally on my internal laptop speakers, but I can't seem to send that to device 39 successfully.

I am suspecting that there are a few other things that need to be setup before it works, i.e. setting up airplay output to "denon", maybe opening a channel and reserving it. I don't know.

Has anyone played with this? Is there a way to setup airplay from the command line? That would be awesome :)

share|improve this question
    
Cross posting is not desirable. Choose an appropriate stack exchange and post your question once. If the community decides that it doesn't belong here or on another stackexchange it gets moved to the correct one. Right now the best thing to do is to delete the question at here and stick to superuser (where you already got one vote). –  Bart Arondson Nov 11 '13 at 0:54
    
The other alternative is to edit / craft the question to be specific to how Apple users might see / answer the question. If there really isn't a good differentiator - it's best to just pick one site and ask. –  bmike Nov 11 '13 at 0:58

2 Answers 2

up vote 2 down vote accepted

I was playing with this a couple of weeks ago.

To send to my Apple Tv via airplay I used

 say -r160 -a "AirPlay" "Hover over a Method name while holding down the Option key until a question mark  appears"

One thing I noticed at the time was that I sometimes would have to run a second command to switch the audio back to the computer.

 say -r160 -a "AirPlay" "Hover over a Method";say -r160 -a "Built-in Output" "I am back"

*update Just tested using the numbers and they work just as well in place of the device name.

share|improve this answer

Yes - I am not getting this to work and conclude that it's not your or my setup, but perhaps a bug or deficient documentation in the man page. The way this is supposed to work is that you simply execute the say command and point the output to the desired device.

 say -a 37 hi
 say -a 47 hi

On my MacBook Pro, I have 37 for AirPlay, 47 for internal speakers and 64 for the DisplayPort cinema display speakers. Devices 47 and 64 work correctly, but when I send any audio to AirPlay (either before or after selecting one of the several AppleTV and AirPlay receivers that are otherwise workable) - the say command errors with error -50.

 Setting audio output device failed: -50

I agree this would be fun to use and have filed a bug with Apple. Let's see if they can point us to a missing step or if it's really just needing for the say program to get a patch.

After seeing the other answer by markhunte, I tried using say -a "AirPlay" "hello" and it worked for me to have AirPlay output spoken. Once that command was run, the-a 37` works now too. I'm now curious if it's just something that is fragile or the text somehow gets things connected better.

share|improve this answer
    
I only have the one Airplay device. I wonder if the problem is when there are multiple. –  markhunte Nov 11 '13 at 2:12
    
@markhunte Excellent data point. I didn't think to use "AirPlay" and now that I do that, things work. Credit to you for the solution! –  bmike Nov 11 '13 at 2:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.