Overview
CircuitPython continues to evolve into a easy to use language to program microcontrollers and single board computers. With CircuitPython Turbo on ESP32-S3, RP2350 (and similarly fast boards likely to follow), music playing capabilities have expanded. FLAC (Wikipedia) and Ogg (Ogg Vorbis) (Wikipedia) are popular open source audio formats that some prefer over MP3 for their higher audio quality. These file formats can now be played using CircuitPython.
Note that Ogg is the container and Vorbis is the codec inside it. The library plays Ogg Vorbis only.
This guide shows how to play various FLAC and Ogg files using the Adafruit Feather ESP32-S3 and the Adafruit Fruit Jam which uses the Raspberry Pi RP2350B microcontroller.
Performance
The measured performance of decoding audio is as follows. FJ is Fruit Jam (at two CPU frequencies) and S3 is the ESP32-S3 Feather with 4 MB Flash, 2 MB PSRAM:
Ogg, viper kernel, quality 0.6 Load = decode time / audio time. Under 100% keeps up. Rate Ch FJ 150 MHz FJ 300 MHz S3 240 MHz 11 kHz mono 18% 9% 15% 22 kHz mono 32% 16% 27% 22 kHz stereo 65% 33% 52% 44.1 kHz mono 65% 34% 49% 44.1 kHz stereo 129% 67% 97% 48 kHz stereo 139% 72% 104% FLAC 16-bit, level 5 (viper kernel) Load = decode time / audio time. Under 100%, the decoder can keep up. Rate Ch FJ 150 MHz FJ 300 MHz S3 240 MHz 22 kHz mono 8% 4% 7% 22 kHz stereo 20% 11% 14% 44.1 kHz mono 15% 8% 13% 44.1 kHz stereo 33% 17% 26% 48 kHz stereo 36% 19% 28%
FLAC is the clear winner for performance and access to high quality. Ogg will save space, but the trade off is CPU.
For the Feather ESP32-S3 or Feather RP2350 version:
- or -
- or -
And for the Fruit Jam version:
If you intend to breadboard the Feather project:
Page last edited October 22, 2026