Go Play 2

This is a work in progress Airplay 2 Speaker implementation largely inspired by airplay2-receiver



  • be registered with the Home App and be directed by Siri !
  • Play AAC 44100 with buffered audio
  • Play/Pause/Stop/Seek
  • PTP supported and sync with homepod mini

Next Step

  • Play ALAC
  • Need to be hardened
  • Supports Audio UDP (spotify)

Multi Room accuracy

PTP (Precision Time protocol) is implemented, but it does not (yet) use NIC hardware timestamps. Therefore, the accuracy is around 1ms of offset between clocks.

How to build

  • Clone the repository

  • Get Dependencies (-d means no direct build)

go get -d 
  • Build dependency (go-fdkacc), and the program



You need to have binutils, portaudio-dev, gcc and go runtime installed to build this program

Raspberry Pi


Docker image

You can build the image to test Linux build and that the service run properly

  • Build the image

docker build -t albanseurat/goplay2:latest .
  • Run the container

docker run -p 7000:7000 -it albanseurat/goplay2:latest


  • Docker build is intended to test building the program on Linux platform
  • Bonjour/mDns implementation needs to be changed to allow exposing airplay service outside docker container


goplay2 by default run only on the ipv4 interface (because this issue on ipv6 parsing)


delay (ms) is subtracted from the local “clock”
Ex: It takes around 60ms on my mac to launch the audio stream at the Anchor Time

i (interface) used to listen (by default eth0)

n (name) used as accessory name (Bonjour)

alsa (alsa port name) to replace default pcm port (default : pcm.default)

./goplay2 -alsa pcm.default -i en0 -n aiwa

By AlbanSeurat