ESP32 as Wireless Speaker?

Does anyone know a firmware for the esp32 to use it as wifi speaker receiver? So that I can use it with an I2S dac and amp to stream my sound to it?
For now, my concept of my diy wireless speaker is using a raspberry pi running roc to receive the roc stream from my server (manjaro, using pulseaudio), but using a raspberry pi for just receiving an audio stream would be a bit overkill.
Maybe sending a stream from a mic back to the server for using voice recognition and/or controlling a few neopixels over mqtt would be really really really nice.

1 Like
1 Like

I used a pi zero w to make a wireless speaker. It generates an I2S stream for your dac.

See this project here for ESP32 which uses squeezebox. You can buy ready built ESP32 with DAC and amplifier. More details on below link.

2 Likes

Small update: Since nothing i found using an esp as brain or aloowed me to attach it “directly” to my server via pulseaudio or roc-audio or something else, Im going to use a raspi with roc-audio as speaker. I tried avoiding it, because i still think, a raspi is overkill and i had an esp32 laying around. But i killed my raspi 3b+ because im a professional idiot while experimenting, but ive ordered a raspi zero w. Together with an adafruit i2s audio bonnet and some cheap active speakers for 10 euros, which btw sound horrible for music, im going to build the speaker itself. Also, im going to add a rotary encoder and a few buttons for media control of some other devices like my xbox.
Im going to post some updates how it will work out. BTW, do you know a europpean supplier for raspi zero w´s? Ive ordered one from berrybase (i live in germany)for 10 euros, but they are limited to one per customer. Maybe Ill need some more zero´s, because im a professional idiot and sometimes there are projects that are not possible or easy to do with microcontrollers.

You were given two options that use an ESP to connect to home assistant?

Not the way, i want. I dont want to tell the esp to play an mp3 file. I want to stream directly to it via pulseaudio or similar. That way, theres no need to create mp3 files for every thing i want. And via squeezebox i havent found a way to use the sound coming from the server to stream to my clients.

pi zero w works fine for this application.

One thing I added that was pretty useful was a reset button. Sometimes my pi would get out of sync and I couldn’t connect to it via airplay, so used the reset button so I would not have to unplug the pi when this happened.

I think pi zero’s have been on one per order forever because they are so cheap.

Here is my documentation, I can’t guarantee its completely accurate, but most of it was at the time I made the project.

Randy