Record & Playback Audio on ESP32 SD Card: Step-by-Step Guide & Demo @atomic14
Record & Playback Audio on ESP32 SD Card: Step-by-Step Guide & Demo  @atomic14
Uploaded April 2021 | Updated September 2026, 1 week ago
In this video, we record audio to an SD Card as a WAV file and then play it back.

If you like ESP32 audio videos - I've got a complete set on this playlist: youtube.com/playlist?list=PL5vDt5AALlRfGVUv2x7riDMIOX34udtKD

I'm using an I2S microphone in the video which I've set up to use DMA to collect the samples. These are streamed straight to the SD Card and we create the WAV file header so that it's a valid file.

For playback, I'm using an I2S 3W amplifier board from Adafruit. This is connected to a 4ohm speaker. Once again we use DMA to transfer the samples which are streamed from the SD Card.

You should be able to modify the code to use the built-in ADC and an analogue microphone board, and you can modify the code to output using the DAC which would let you wire this up to headphones or an analogue amplifier.

[0:55] SD Card to SPI Wiring Diagram
[1:11] Soldering up an SD Card adaptor
[1:30] Getting it working
[2:27] Demo
[2:50] Looking at the WAV file on our PC
[3:22] Conclusions and wrap up

As always the code is on GitHub: github.com/atomic14/esp32_sdcard_audio

I2S Amplifier MAX98357 - amzn.to/3cg88Z5
TinyPico - amzn.to/3vVoONp
or ESP32 Dev board: amzn.to/3gb6fyc
INMP441 I2S Microphone: amzn.to/3cicuiv
or ICS-43434 I2S Microphone: tindie.com/products/21519

I think I might turn this into a nice little voice memo device.

----
Patreon: patreon.com/atomic14
ko-fi: ko-fi.com/atomic14
Record & Playback Audio on ESP32 SD Card: Step-by-Step Guide & DemoAnother Street Battery SalvageDodgy circuit could have caused a fire!How to make your ESP32-S3 code faster.We werent really going for speed - but this gets quite fast...Streaming Video From an SD Card on the ESP32.ESP32 Walkie-Talkie: DIY Audio MagicPCB Mistake Turns into Vacuum Stencil Experiment | MHP30 Hotplate TestMaking this CR*P Night Light GOODThis really SUCKS.... and I love it!ESP32 Audio DMA Settings Explained - dma_buf_len and dma_buf_countSuper Easy ESP32-S3 Dev Board
atomic14 |

Record & Playback Audio on ESP32 SD Card: Step-by-Step Guide & Demo

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER