Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Use an ESP32 for a practical standalone audio recorder. Its I²S peripherals and DMA make it straightforward to capture a digital MEMS microphone and stream PCM audio to a microSD card. An ESP8266 NodeMCU can record short, low-fidelity speech or sound clips, but usually needs an analog microphone amplifier, careful ADC timing, or an external codec.

What “audio recorder” can mean

A small microcontroller recorder might be a voice-memo device, a continuous sound logger, a sound-triggered alarm recorder, a Wi-Fi uploader, or a machine and wildlife sampler. Playback-only projects are different again. A basic NodeMCU setup is realistic for intelligible speech and sound detection; music-grade recording requires better analog conversion, clocks, power, storage and enclosure design.

The signal chain is always:

microphone → sampling interface → buffers → storage → WAV file

ESP8266 versus ESP32

Area ESP8266 NodeMCU ESP32
Preferred microphone Analog amplifier or external codec Digital I²S or PDM MEMS microphone
Audio path 10-bit ADC; reliable fixed-rate capture takes more work Dedicated I²S controllers with DMA on supported variants
Storage SPI microSD or external storage SPI microSD, compatible SD/MMC, or RAM for short clips
Best use Experiments, triggers and short speech Practical WAV recorder and networked audio device
Main risks ADC noise, board-specific input scaling and timing jitter Pin conflicts, microphone-mode mismatch and SD write latency

Espressif documents a 10-bit ESP8266 ADC, while its current ESP-IDF I²S documentation describes receiver operation and DMA on ESP32-family devices. Capabilities differ between ESP32, ESP32-S2, ESP32-S3, ESP32-C3 and other variants, so verify the exact chip rather than treating every “ESP32” board as identical.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Microphone choices

I²S/PDM MEMS microphone: the normal ESP32 choice

A digital microphone typically uses clock (BCLK or PDM clock), word-select/LRCLK where applicable, data, 3.3-V power and ground. Module labels vary: Arduino-ESP32 calls the signals sck, ws and din. Some modules require standard I²S reception; others require PDM reception or conversion. Check the exact datasheet, channel-select state, sample width and voltage before wiring.

#1 Best Overall
ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA Compatible with Arduino IDE (3PCS)
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Support LWIP protocol, Freertos
  • SupportThree Modes: AP, STA, and AP+STA
  • Ultra-Low power consumption, Compatible with Arduino IDE
  • ESP32 is a safe, reliable, and scalable to a variety of applications

Espressif’s official I²S recorder example captures a digital PDM microphone and writes a 44.1-kHz, 16-bit WAV file to an SD card. Its GPIO assignments are configurable examples, not universal pin requirements.

The Adafruit ICS-43434 breakout page specifies 1.6–3.6 V operation and warns against 5-V logic, but also says the part is discontinued and identifies the SPH0645LM4H as a drop-in replacement. Treat it as a documented reference, not an automatic buying recommendation; verify current stock and the replacement’s interface.

Analog electret amplifier

A board such as the MAX9814 provides an amplified analog output for an ADC and can be used with either controller. It adds quantisation and supply noise, biasing and range issues, sampling-jitter sensitivity, and possible clipping from automatic gain control. An ESP8266’s ADC is consequently better suited to sound thresholds or modest speech than demanding PCM recording. Confirm the exact NodeMCU board’s ADC divider and input range; “NodeMCU” does not guarantee one circuit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

External codec

An audio ADC/codec supplies analog conditioning, gain and digital conversion, making an ESP8266 design more reliable at the cost of hardware and firmware complexity. A codec board such as the VS1053 breakout also provides microSD and codec functions, but it is no longer the simplest ESP32-native design.

Rank #2
ELEGOO 3PCS ESP-32 Dev Boards, ESP-WROOM-32, USB-C, WiFi Bluetooth 4.2
  • Dual-Core Performance Up to 240 MHz: Run sensor processing, wireless communication, automation logic and connected-device tasks on a 32-bit dual-core ESP32 platform designed for responsive embedded and IoT projects
  • Built-in Wi-Fi and Bluetooth 4.2: Connect to 2.4 GHz Wi-Fi networks or use Bluetooth Classic and BLE for wireless sensors, smart devices, remote controls, home automation and other connected projects
  • Flexible Power-Saving Modes: ESP32 power-management features support dynamic clock scaling and low-power operating modes, helping developers reduce energy use in compatible sensing, monitoring and connected-device applications, suitable for battery-powered Internet of Things (IoT) devices.
  • USB-C Programming with CP2102: Connect through USB-C for power, sketch uploads and serial monitoring, while GPIO, UART, SPI and I2C interfaces support sensors, displays, motor drivers and other modules (USB-C cable not included)
  • Over-the-Air Update Support: Configure OTA functionality through a compatible ESP-32 software framework to update deployed firmware over Wi-Fi without reconnecting the board by USB for every revision

Recommended ESP32 build

  • ESP32-DevKitC or another documented ESP32 board; the DevKitC exposes GPIO, USB-UART, regulator and buttons for breadboard work.
  • A current 3.3-V I²S/PDM MEMS microphone.
  • A 3.3-V-compatible SPI microSD breakout and good-quality card.
  • Push button for start/stop and an optional status LED.
  • Stable USB power with adequate local decoupling.

Connect the microphone’s power and ground, then its clock, word-select (if required) and data lines to GPIOs selected for your exact board. Avoid flash-connected, bootstrapping, USB, PSRAM or onboard-peripheral conflicts. The SD interface can use SPI; Espressif’s example lists GPIO17 (MISO), GPIO16 (MOSI), GPIO18 (SCLK) and GPIO19 (CS), but these are example defaults only. Bare card sockets require correct 3.3-V signalling and power decoupling; modules may add regulators or level shifting.

Software paths

ESP-IDF: strongest reference

Start with the matching branch of Espressif’s i2s_recorder example. Configure pins and audio settings with idf.py menuconfig, then build, flash and monitor:

idf.py menuconfig
idf.py build
idf.py flash
idf.py monitor

Use the example matching your installed ESP-IDF release instead of copying an old tutorial unchanged.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Arduino-ESP32: easiest beginner route

The current I²S API provides I2SClass, setPins(), begin(), available(), read() and convenience functions such as recordWAV(). A sensible sequence is:

Rank #3
ELEGOO ESP-32 Super Starter Kit with Tutorial Compatible with Arduino IDE
  • Powerful ESP-32 Board: Unlock the world of Internet of Things (IoT) and advanced electronics with the heart of this kit: the ESP-32 board. It features a powerful dual-core processor, integrated Wi-Fi and Bluetooth 4.2, making it perfect for building connected, smart devices that communicate with your phone or the cloud. It's fully compatible with the Arduino IDE for easy programming.
  • Super Starter Kit: This kit contains over 35 different modules and electronic components, including sensors, displays, motors, and input devices. From LEDs and buttons to an OLED screen, servo motor, and keypad, you have everything needed to explore a vast range of projects in one box.
  • Step by Step Online Tutorial: Jump right in with our detailed, beginner-friendly tutorial. Access 30+ projects with complete code, clear circuit diagrams, and step-by-step instructions. Learn the fundamentals of electronics, coding, and how to utilize the ESP-32's unique capabilities without any prior experience.
  • Hands-on Learning for All Skill Levels: Perfect for students, makers, engineers, and hobbyists. Start with basic circuits and coding, then progress to intermediate and advanced IoT applications. Build practical projects like weather stations, smart home controllers, remote-controlled devices, and interactive gadgets. The skills you learn are the foundation for real-world innovation.
  • Quality & Great Support: Elegoo is committed to quality. We provide a clear, detailed tutorial guide, refined code, and a well-organized component kit. All modules are carefully selected for reliability and ease of use. Our dedicated technical support team and active online community are ready to help you succeed in your learning journey.
  1. Select the exact ESP32 board in Arduino IDE.
  2. Identify the microphone’s voltage, interface and channel pin.
  3. Configure I²S and print raw sample activity before adding storage.
  4. Write PCM in chunks to an SD file.
  5. Patch the WAV sizes, flush and close the file when recording stops.

recordWAV() keeps a complete short recording in memory and returns a buffer that your program must free. It is convenient for short clips, not unlimited SD streaming.

ESP8266 Arduino

For an analog design, amplify and bias the microphone, verify the board’s ADC range, sample at a fixed interval using a timer or tightly controlled loop, convert readings to PCM and write them to SD. For better analog quality, add an external ADC or codec and use a supported digital interface. The ESP8266 RTOS SDK documents I²S, but that does not make digital-microphone capture equally simple in the mainstream Arduino workflow.

WAV and storage calculations

For mono PCM:

bytes per second = sample rate × bits per sample ÷ 8
Format Raw rate Approx. one minute
8 kHz, 8-bit mono 8 KB/s 480 KB
16 kHz, 16-bit mono 32 KB/s 1.92 MB
22.05 kHz, 16-bit mono 44.1 KB/s 2.65 MB
44.1 kHz, 16-bit mono 88.2 KB/s 5.29 MB
44.1 kHz, 16-bit stereo 176.4 KB/s 10.58 MB

A PCM WAV needs RIFF, WAVE, a fmt chunk and a data chunk. For 44.1-kHz, 16-bit mono, block alignment is 2 bytes and byte rate is 88,200 bytes/second. Write a placeholder header, stream audio, seek back to update file and data sizes, then flush and close. A power cut before that update can leave an unplayable file, so short segmented recordings are safer for unattended devices.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WAV/PCM is easy to inspect and has no encoder cost, but files are large. MP3, AAC or Opus saves space and upload bandwidth while adding encoder CPU, memory and real-time buffering risk. The ESP8266Audio project primarily provides decoding and playback; a playback library is not automatically a microphone recorder.

Rank #4
ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA Compatible with Arduino IDE (1 PCS)
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Support LWIP protocol, Freertos;ESP32 is a safe, reliable, and scalable to a variety of applications
  • SupportThree Modes: AP, STA, and AP+STA
  • Ultra-Low power consumption, Compatible with Arduino IDE
  • 1PCS 30Pin ESP32 Development Board 2.4GHz WiFi Dual Cores Microcontroller Integrated with Antenna RF Low Noise Amplifiers Filters
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why recordings fail

Silence or noise

Check standard I²S versus PDM mode, clock/data pins, channel-select state, common ground, 3.3-V power, slot format and sample width. Test the microphone with the smallest read-only program, print raw values, and compare settings with Espressif’s example.

WAV will not play

Inspect the first 44 bytes. Recalculate RIFF and data sizes from bytes actually written, ensure mono/stereo and bit depth match the samples, and flush and close the file.

Clipping

An analog output may exceed the ADC range, or AGC may react too aggressively. Reduce gain, add headroom in conversion and move the microphone away from loud sources.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Clicks, gaps or failed SD writes

SD cards have variable write latency. Capture continuously into a ring buffer, write larger blocks from a separate task, increase buffering, preallocate where supported, avoid long synchronous Wi-Fi work, and test another card and power supply.

Best Value
HiLetgo ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA for Arduino IDE
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Ultra-Low power consumption, works perfectly with the Arduino IDE
  • Support LWIP protocol, Freertos
  • SupportThree Modes: AP, STA, and AP+STA
  • ESP32 is a safe, reliable, and scalable to a variety of applications

Unstable ESP8266 ADC

RF and supply activity, incorrect divider assumptions, poor biasing and uneven sample intervals are common causes. Confirm the board schematic, add filtering and decoupling, use a fixed-rate timer, and consider an external ADC or codec.

Works on one ESP32 board only

Family member, Arduino core/ESP-IDF version, flash or PSRAM pins, bootstrapping pins and onboard peripherals differ. Recheck the current documentation and board pinout rather than relying on legacy APIs or GPIO lists.

Which design should you choose?

Requirement Best choice
Cheapest sound experiment ESP8266 plus analog amplifier
Least troublesome beginner recorder ESP32 plus documented I²S/PDM microphone and SPI microSD
Speech-triggered logger ESP8266 is acceptable if clips are short and quality is modest
Long-duration WAV ESP32 with DMA, ring buffers and chunked SD writes
Improved analog input Either controller with an external codec
Music-grade or production recorder Dedicated audio hardware with tested power-loss and storage handling

Choose ESP32 when audio quality, reliable sampling, Wi-Fi control or future expansion matters. Keep an existing ESP8266 for basic speech, triggers and experiments—but do not present the two boards as interchangeable recorders.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.