Turns out it can.
…at least, if you have the memory. You can only store a minute or so at a sample rate of 16 kHz, which is already on the low end of sample rates.
The ESP32 has two 8-bit DACs, so we just need to go into Audacity and make a wav file at a 16 kHz sample rate (or lower if you want to store more of the song), with unsigned 8-bit PCM.
Then we can use scipy.io.wavfile
to store the song as an unsigned 8-bit integer array,
and call dacWrite(25,data[i])
to write the i
-th sample to pin 25 of the board.