As for the playback, the example looks STM32 based and loads data from sd card into RAM. With nrf52 internal storage the require("Storage").read("sound.raw") actually does not read anything into RAM, it gives direct pointer to flash memory and I am not sure it can play audio directly from that (nrf52 DMA cannot read from flash, only RAM?). So I'd suggest to copy data to new array in RAM to see if it makes difference.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
As for the playback, the example looks STM32 based and loads data from sd card into RAM. With nrf52 internal storage the
require("Storage").read("sound.raw")
actually does not read anything into RAM, it gives direct pointer to flash memory and I am not sure it can play audio directly from that (nrf52 DMA cannot read from flash, only RAM?). So I'd suggest to copy data to new array in RAM to see if it makes difference.