# MP3 Playback with CircuitPython

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/131/100/medium800/circuitpython_Screenshot_2024-01-22_111822.png?1720452517)

Compressed audio can be a nice alternative to uncompressed WAV files, especially when you have a small filesystem like that on many CircuitPython boards, as WAV files get sizeable quite quickly.

MP3 technology dates to the 1990s and [all the patents have long since expired worldwide](https://en.wikipedia.org/wiki/MP3#Licensing_and_patent_issues), making it an obvious choice for compressed audio. For this reason, many builds of CircuitPython include the `audiomp3` module with its `MP3Decoder` object.

You can listen to a much longer playlist with CircuitPython, using the built in MP3 playback capability!

The MP3 decoder itself supports a wide range of formats, including CBR, ABR and VBR. Across most boards that support MP3Decoder, we've found that **mono and stereo** files from **32kbit** /s to **128kbit** /s work, with sample rates from **16kHz** to **44.1kHz**.

More powerful boards can even **decode and mix two MP3s** and some Espressif boards can **stream MP3s from a web server**.

## MP3 playback projects

Want some ideas about what you can do with MP3 playback? Here are a few of the MP3 projects which are documented on the Adafruit Learning System:

[PyGamer MP3 Player with CircuitPython](https://learn.adafruit.com/pygamer-mp3-player-with-circuitpython)

![circuitpython_projects_IMG_20200518_100307.jpg](https://cdn-learn.adafruit.com/assets/assets/000/131/078/medium640/circuitpython_projects_IMG_20200518_100307.jpg?1720042572)

[MP3 Playback in CircuitPython with Lars the Sloth Puppet](https://learn.adafruit.com/mp3-circuitpython-lars)

![circuitpython_projects_lars-2400.jpg](https://cdn-learn.adafruit.com/assets/assets/000/131/079/medium640/circuitpython_projects_lars-2400.jpg?1720042683)

[PyPortal Winamp MP3 Player](https://learn.adafruit.com/pyportal-winamp-mp3-player)

![circuitpython_base_photo.png](https://cdn-learn.adafruit.com/assets/assets/000/131/080/medium640/circuitpython_base_photo.png?1720042731)

## Parts for the MP3 Streaming Example
### Adafruit Metro ESP32-S3 with 16 MB Flash 8 MB PSRAM

[Adafruit Metro ESP32-S3 with 16 MB Flash 8 MB PSRAM](https://www.adafruit.com/product/5500)
What's Metro-shaped and has an ESP32-S3&nbsp;WiFi module? What has a STEMMA QT connector for I2C devices and a Lipoly charger circuit? What has your favorite Espressif WiFi microcontroller and lots of memory for your next IoT project?

That's right - it's the new...

In Stock
[Buy Now](https://www.adafruit.com/product/5500)
[Related Guides to the Product](https://learn.adafruit.com/products/5500/guides)
![Angled shot of black, credit-card-sized dev board.](https://cdn-shop.adafruit.com/640x480/5500-10.jpg)

### Adafruit Metro ESP32-S2

[Adafruit Metro ESP32-S2](https://www.adafruit.com/product/4775)
What's Metro shaped and has an ESP32-S2 WiFi module? What has a STEMMA QT connector for I2C devices, and a Lipoly charger circuit? What has your favorite Espressif WiFi microcontroller and lots of memory for your next IoT project?

That's right - its the new Adafruit Metro...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4775)
[Related Guides to the Product](https://learn.adafruit.com/products/4775/guides)
![Angled shot of Adafruit Metro esp32-s2 ](https://cdn-shop.adafruit.com/640x480/4775-06.jpg)

### Adafruit ESP32 Feather V2 w.FL Antenna -  8MB Flash + 2 MB PSRAM

[Adafruit ESP32 Feather V2 w.FL Antenna -  8MB Flash + 2 MB PSRAM](https://www.adafruit.com/product/5438)
One of our star Feathers is the [Adafruit HUZZAH32 ESP32 Feather](https://www.adafruit.com/product/3405) - with the fabulous ESP32 WROOM module on there, it makes quick work of WiFi and Bluetooth® projects that take advantage of Espressifs most popular chipset. Recently we had...

In Stock
[Buy Now](https://www.adafruit.com/product/5438)
[Related Guides to the Product](https://learn.adafruit.com/products/5438/guides)
![Angled shot of rectangular microcontroller.](https://cdn-shop.adafruit.com/640x480/5438-10.jpg)

### Part: I2S Decoder
quantity: 1
PCM5102A I2S AUX Stereo Digital Audio DAC Decoder Board
[I2S Decoder](https://www.amazon.com/dp/B09C5QX228)

- [Next Page](https://learn.adafruit.com/mp3-playback-with-circuitpython/mp3-capabilities-by-microcontroller.md)

## Featured Products

### Adafruit Metro ESP32-S3 with 16 MB Flash 8 MB PSRAM

[Adafruit Metro ESP32-S3 with 16 MB Flash 8 MB PSRAM](https://www.adafruit.com/product/5500)
What's Metro-shaped and has an ESP32-S3&nbsp;WiFi module? What has a STEMMA QT connector for I2C devices and a Lipoly charger circuit? What has your favorite Espressif WiFi microcontroller and lots of memory for your next IoT project?

That's right - it's the new...

In Stock
[Buy Now](https://www.adafruit.com/product/5500)
[Related Guides to the Product](https://learn.adafruit.com/products/5500/guides)
### Adafruit Metro ESP32-S2

[Adafruit Metro ESP32-S2](https://www.adafruit.com/product/4775)
What's Metro shaped and has an ESP32-S2 WiFi module? What has a STEMMA QT connector for I2C devices, and a Lipoly charger circuit? What has your favorite Espressif WiFi microcontroller and lots of memory for your next IoT project?

That's right - its the new Adafruit Metro...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4775)
[Related Guides to the Product](https://learn.adafruit.com/products/4775/guides)
### Adafruit ESP32 Feather V2 w.FL Antenna -  8MB Flash + 2 MB PSRAM

[Adafruit ESP32 Feather V2 w.FL Antenna -  8MB Flash + 2 MB PSRAM](https://www.adafruit.com/product/5438)
One of our star Feathers is the [Adafruit HUZZAH32 ESP32 Feather](https://www.adafruit.com/product/3405) - with the fabulous ESP32 WROOM module on there, it makes quick work of WiFi and Bluetooth® projects that take advantage of Espressifs most popular chipset. Recently we had...

In Stock
[Buy Now](https://www.adafruit.com/product/5438)
[Related Guides to the Product](https://learn.adafruit.com/products/5438/guides)
### Analog Potentiometer Volume Adjustable TRRS Headset

[Analog Potentiometer Volume Adjustable TRRS Headset](https://www.adafruit.com/product/3959)
Most modern headphone sets are purely digital - with three volume control buttons in-line with the cable. These headphones are interesting in that they have an _analog_ volume control potentiometer. Perfect for use with electronic projects that don't have volume control, or for...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/3959)
[Related Guides to the Product](https://learn.adafruit.com/products/3959/guides)

## Related Guides

- [Adafruit Metro ESP32-S2](https://learn.adafruit.com/adafruit-metro-esp32-s2.md)
- [Adafruit ESP32 Feather V2](https://learn.adafruit.com/adafruit-esp32-feather-v2.md)
- [Adafruit Metro ESP32-S3](https://learn.adafruit.com/adafruit-metro-esp32-s3.md)
- [WiFi Mailbox Notifier](https://learn.adafruit.com/wifi-mailbox-notifier.md)
- [CAN Bus with CircuitPython: Using the canio module](https://learn.adafruit.com/using-canio-circuitpython.md)
- [Use Docker to Compile Linux for ESP32-S3](https://learn.adafruit.com/docker-esp32-s3-linux.md)
- [ESP-NOW in CircuitPython](https://learn.adafruit.com/esp-now-in-circuitpython.md)
- [Garden Path Lights with WLED and a Sunset Timer](https://learn.adafruit.com/garden-path-lights-with-sunset-timer.md)
- [Temperature and Humidity Sensing in Home Assistant with CircuitPython](https://learn.adafruit.com/temperature-and-humidity-sensing-in-home-assistant-with-circuitpython.md)
- [WiFi-Controlled NeoPixel Matrix LED Sign](https://learn.adafruit.com/iot-led-sign.md)
- [Introducing Adafruit Feather](https://learn.adafruit.com/adafruit-feather.md)
- [Networking in CircuitPython](https://learn.adafruit.com/networking-in-circuitpython.md)
- [Animating Animatronics](https://learn.adafruit.com/animating-animatronics.md)
- [Plotting Offline Data - JSONL to CSV files, filters and graphs](https://learn.adafruit.com/plotting-offline-data-jsonl-to-csv-files-filters-and-graphs.md)
- [No-Code WipperSnapper Summoning Horn](https://learn.adafruit.com/adafruit-io-wippersnapper-summoning-horn.md)
- [IoT Power Outlet with CircuitPython and Adafruit IO](https://learn.adafruit.com/adafruit-io-a-c-power-relay.md)
