Audio to C Header for Embedded Systems

Raw Audio C Header for Embedded Systems
🎵
DROP AUDIO FILE HERE
click to browse — MP3, WAV, OGG, M4A, FLAC — runs fully in browser, no upload
FILE:
SIZE:
DURATION:
ORIG SR:
CHANNELS:
Sample Rate
AVR/PIC/basic MCU
Bit Depth
uint8_t · unsigned 0–255
Channels
stereo doubles output size
MEMORY LIMIT:
— of 32 KB used
VAR NAME: .H FILENAME:
uncheck for ESP32 / STM32 / RP2040 / Teensy
PROCESSING...
0%
sounddata.h

Raw Audio to C Header for Embedded Systems converts any short audio clip — MP3, WAV, OGG, M4A, or FLAC — directly into a ready-to-use C header file (.h) containing a uint8_t byte array of raw 8-bit, 8kHz mono PCM samples. Simply drop your audio file into the tool, customize the variable name and filename, then hit Convert. The tool runs entirely in your browser using the Web Audio API — no file is ever uploaded to a server. The generated header includes #define constants for sample rate and array length, an #ifndef include guard, and PROGMEM storage specifier for AVR/Arduino flash memory (easily removed or redefined for other platforms). The output is compatible with virtually any microcontroller — Arduino, ESP32, ESP8266, STM32, PIC, RP2040 (Raspberry Pi Pico), and beyond — making it straightforward to play back sound effects, voice prompts, or tones using a PWM pin, a simple R-2R DAC, or any audio output stage driven by an 8kHz timer interrupt.

Post a Comment