In this example we decode a WAV file into RAW output and send it to a PWM pins (on a Raspberry Pico or ESP32) The WAV file has been down sampled with the help of Audacity and then converted into an array with xxd.
The Sketch implements the following audio pipline:
MemoryStream -> AudioOutputStream -> WAVDecoder -> AudioPWM
The output pin is GPIO2