What a coincidence. I am working on a Halloween project and needed just this.
This YT video shows how it's done. It works despite the huge number of warnings from the compiler for a poorly written library:
But, it does work. Low-fi, 8-bit, mono, but great solution for a simple SFX from an ESP8266.