// the find
earlephilhower/ESP8266Audio
Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, OGG/Opus, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32 and Pico
An Arduino library that ports multiple audio decoders (MP3, AAC, FLAC, MIDI, WAV, Opus, MOD, RTTTL) to run on ESP8266, ESP32, and Raspberry Pi Pico, with output drivers for I2S DACs and a software delta-sigma DAC that needs only a single transistor. It's the go-to solution if you want audio playback on constrained microcontrollers without pulling in a separate DSP chip.
The software delta-sigma DAC is genuinely clever — 32x-128x oversampling via the I2S peripheral means you can drive a speaker with a $0.05 transistor, no external DAC needed. The source/generator/output abstraction is clean: swap in HTTP streaming, SPIFFS, PROGMEM, or SD without changing your decoder code. Bundling the full decoders (libMAD, libflac, Helix AAC, Opus) as vendored C inside the Arduino library means no build-system gymnastics. The MIDI path using TinySoundFont for wavetable synthesis on a microcontroller is a neat trick that most people wouldn't attempt.
PlatformIO support is effectively broken for ESP32 — the official Espressif package is stuck on IDF 4.x and this library requires 5.x, so you have to reach for an unofficial community fork just to compile. The HTTP streaming source is described in the README itself as 'not yet resilient' and stutters at 44.1kHz/128kbps, which is the only bitrate web radio actually uses. AAC commercial use requires separate licensing from Via Licensing regardless of the code being open — easy to miss if you're shipping a product. The library is cooperative-only (you call loop() in your main loop), so any blocking operation or large delay() in your sketch causes audio glitches, which puts the burden of real-time scheduling entirely on the application author.