Digital-to-Analogue Converter
A DAC converts a digital number (0-255) into an analogue voltage (0-3.3V). The ESP32 has two: GPIO25 (DAC1) and GPIO26 (DAC2).
Audio works by writing thousands of sample values per second - each number sets an exact voltage level, and the rapid succession of levels forms a waveform that the amplifier drives into the speaker.