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

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!