I can't remember about the exact 16 bit encoding, but I'd strongly recommend just using 8 bits - it's not like you'll get anything over 8 bits worth of quality using PWM as a DAC :)
For 8 bits I seem to recall I had to export from Audacity as 'unsigned' or something like that. Basically you want a value from 0..255, not -128..127. You could always just add 128 to the numbers in Espruino when you load the buffer, but if you can it's worth getting the data right at the start.
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.
I can't remember about the exact 16 bit encoding, but I'd strongly recommend just using 8 bits - it's not like you'll get anything over 8 bits worth of quality using PWM as a DAC :)
For 8 bits I seem to recall I had to export from Audacity as 'unsigned' or something like that. Basically you want a value from 0..255, not -128..127. You could always just add 128 to the numbers in Espruino when you load the buffer, but if you can it's worth getting the data right at the start.