Voice Control Airfoil (aka, my home audio rube goldberg machine)

So, I've always wanted to control my home audio setup via voice. Sure, there have been solutions for voice control in the past, but nothing has really worked well for me. I use Airfoil for synced audio around the home.

When I first got an Amazon Echo, I was excited at the possibilities of voice control. With so much development going on, there is a lot of neato things you can do nowadays. Also, with the upcoming release of the Echo Dot, I can have multiple devices (without spending on a "full price" Amazon Echo).

So, here are the pieces I found that will work:

HA bridge emulates a philips hue device and can be used to send on/off/intensity commands to anything with a web API.

Again, I use airfoil for managing audio throughout the home. The latest version 5 has a lot of good features like speaker groups and bluetooth audio support ("multicast" bluetooth A2DP!). In addition to the software, Airfoil includes an applescript based API for controlling airfoil. We can't use this directly with HA Bridge, but the next item fixes that.

airfoil-api is a wrapper for the applescript interface to Airfoil. It was created by jnewland. The link to airfoil-api above is a fork I made that includes a small change to convert the volume input to something that works with HA bridge.

  • The Amazon Echo Dot, a mac mini, and a Spotify Premium Account

I like to use Spotify for my streaming music needs. Spotify Premium is required for playing music on the Echo directly. It's nice to select songs/playlists by voice. Unfortunately, Spotify Connect (the protocol used to send Spotify audio to different devices) does not allow streaming to multiple devices at the same time. So, the idea is to use the new Echo Dot. The Dot has a 3.5mm jack for audio output. It also can output to bluetooth speakers (things the original Echo does not have). I can use this output and feed it into the mac mini. Airfoil can then take that input and send it to any speaker in the network. Easy, right?

So, the audio rube goldberg machine looks like this:

Amazon Echo --> Bluetooth Receiver --> Mac Mini --> Airfoil -- > Speakers

There might be a lot of AD-DA conversions in that chain, but this isn't for high quality music. I just want something so my wife and I can easily play music. The Echo provides that by letting us choose songs by voice. Now, with this new stuff, we can turn speakers on/off and change volume.

While I wait for my Dot, I have made the proof-of-concept using HA Bridge, my existing Echo, and airfoil. Here it is in action:

Now, I just need my damn Echo so I can try this out!

My 2016 Predictions

  • In the Blu-Ray release of The Martian, an alternate ending shows Sean Bean dying as the Hermes lands right on top of his house.

  • Someone on the internet will do a mashup of the new X-Files series and Californication. Spoiler: His name is Cox Mulder.

  • Metallica will play the Super Bowl halftime show. Instead of playing their hits, they will proceed to do the entire Revenge of the Nerds talent show complete with Booger Presley on guitar.

  • Bill Cosby, while serving time in jail, will get his pudding popped. I don't know what that means. Diddly doo sh-lappah shling shlong.

  • Jessican Chastain and Bryce Dallas Howard will appear in a film together and confuse the shit out of everyone.

  • David Hoff will relent after being hassled by many fans.

  • Hollywood begin filming the sequel to Rhinestone with Sylvester Stalone set to sop up more gravy with more biscuits.

  • Star Wars mania will reach its peak when a hologram of Alec Guinness performs at Coachella.

  • Game of Thrones will continue killing Jon Snow every episode a la Kenny McCormick. Samwell Tarly will scream "You killed Jon Snow - you bastards!" at the end of every episode.

  • When The Walking Dead returns from the midseason break, Carl will be older than Rick.