Examples
- Playback: MP3/WAV from SD or network, using
audioI2S or ADF
- Recording: I²S mic (e.g., INMP441), save to SD or stream via Wi-Fi
- FFT / Spectrum Analysis: Real-time FFT at ~10–20 kHz sampling with 1024–2048 samples
| Application |
Typical Setup |
| Wi-Fi speaker / internet radio |
ESP32 + I²S DAC (MAX98357A) + ADF or ESP32Audio |
| Voice recorder / sound sensor |
ESP32 + I²S mic (INMP441) + SD card |
| Audio spectrum visualizer |
ESP32 + mic + FFT + LED matrix |
| Guitar pedal / DSP FX box |
ESP32 + ES8388 codec + custom DSP filters |
| Intercom / VoIP node |
ESP32 + mic/speaker + Wi-Fi streaming via UDP or MQTT |
|
ESP32 + |
Audio Playback
| Use Case |
Interface |
Example ADC / DAC Chips |
Description / What ESP32 Does |
| Internet radio / Wi-Fi speaker |
I²S or SPI DAC |
PCM5102A, MAX98357A, UDA1334A |
Streams MP3/WAV/FLAC via Wi-Fi; decodes and outputs to an I²S DAC. |
| Tone generator / synth |
SPI DAC |
MCP4921, MCP4922, AD5686 |
Generates real-time waveforms or envelopes and outputs analog audio. |
| Use Case |
Interface |
Example ADC / DAC Chips |
Description / What ESP32 Does |
| Microphone or line-in recorder |
SPI ADC |
PCM1802, PCM1808, ADS1115 |
Captures mic or line input, saves as WAV, or streams via Wi-Fi. |
| Sound meter / SPL analyzer |
I²C or SPI ADC |
ADS1115, MCP3008 |
Samples amplitude levels for logging, visualization, or noise monitoring. |
Real-Time DSP (ADC → Processing → DAC)
| Use Case |
Interface |
Example ADC / DAC Chips |
Description / What ESP32 Does |
| Audio effects processor (EQ, delay, distortion) |
SPI (ADC + DAC) |
PCM1802 + PCM5102A, MCP3008 + MCP4922 |
Continuously samples audio, applies digital filters, and outputs processed signal. |
| Guitar pedal / modular FX |
SPI |
MCP3008 + MCP4922 |
Real-time processing and modulation of analog instrument input. |
Analysis & Visualization
| Use Case |
Interface |
Example ADC / DAC Chips |
Description / What ESP32 Does |
| Spectrum analyzer / FFT display |
SPI ADC |
PCM1808, ADS1115 |
Performs FFT on sampled analog audio and visualizes frequency spectrum. |
| Vibration / acoustic sensing |
I²C ADC |
ADS1115, ADS7953 |
Captures vibration or acoustic signatures for diagnostics or art projects. |
Multi-Channel / Sensor Arrays
| Use Case |
Interface |
Example ADC / DAC Chips |
Description / What ESP32 Does |
| Beamforming microphone array |
I²S or SPI ADCs |
PCM1808, TLV320AIC series |
Samples multiple channels for directional sound localization. |
| Analog synth CV input array |
I²C ADC |
ADS1015, ADS1115 |
Reads multiple analog control voltages for synths or control systems. |
Control Voltage & Modulation
| Use Case |
Interface |
Example ADC / DAC Chips |
Description / What ESP32 Does |
| CV/Gate output for synths |
SPI DAC |
MCP4822, AD5686, LTC1668 |
Generates precise analog voltages for modular synthesizers or sequencers. |
| Envelope / LFO generator |
SPI DAC |
MCP4922 |
Outputs modulation or envelope signals for analog control. |
Streaming / Networking
| Use Case |
Interface |
Example ADC / DAC Chips |
Description / What ESP32 Does |
| Wi-Fi audio streamer (analog → network) |
SPI ADC |
PCM1802, MCP3008 |
Converts analog audio to digital and streams over TCP/UDP or MQTT. |
| Intercom / voice link |
I²S or SPI |
ES8388, PCM1802 + PCM5102A |
Handles full-duplex streaming between ESP32 nodes via Wi-Fi or Bluetooth. |
|
|
|
|
Measurement / Instrumentation
| Use Case |
Interface |
Example ADC / DAC Chips |
Description / What ESP32 Does |
| Portable oscilloscope |
SPI ADC |
MCP3208, ADS8688 |
Captures waveforms up to tens of kHz for display or web UI. |
| Data logger / environmental recorder |
I²C ADC |
ADS1115 |
Logs slow analog signals (vibration, pressure, sound level). |
I²S (Inter-IC Sound)
Digital audio interface used for stereo input/output at 16–32 bit depth, up to 96 kHz+. ESP32’s built-in I²S peripheral supports full duplex audio. Often paired with:
- MAX98357A (DAC/amp),
- ICS-43434 (mic),
- UDA1334A,
- ES8388,
- WM8960
External ADC/DAC over I²C or SPI
- PCM1802 / PCM1808 (24-bit, stereo ADC, I²S or SPI)
- MCP3008 / ADS1115 (12–16-bit, I²C/SPI, slower, but good for lower-rate audio or envelope detection)
- PCM5102A (DAC)
ESP32 has several software frameworks for handling digital audio, ranging from Arduino-level simplicity to full pipeline frameworks.
Audio Libraries
Arduino Environment
- ESP32 I2S Library (built-in): lets you stream PCM audio data in/out via I²S.
- ArduinoAudioTools: higher-level API for filters, FFT, sample rate conversion, etc.
- ESP32-audioI2S (GitHub: earlephilhower/ESP32-audioI2S): plays MP3/WAV streams from SD card or URL.
- ESP8266Audio: works on ESP32 too; supports decoding MP3, AAC, FLAC, MOD, etc.
ESP-IDF (Native SDK)
- ESP-ADF (Audio Development Framework): official Espressif audio SDK.
- Supports pipelines with input/output elements.
- Handles codecs, filters, resamplers, Bluetooth A2DP, etc.
- Example: capture mic input → apply filter → play out via DAC.