Sadly the speaker port is output-only, and digital at that.
However if you were willing to do a little more poking you could unsolder a few components from the heart rate PCB (easily accessible on top) and then there's an available analog input on that.
It's not something I'd advise doing for anything in production, but for a prototype or something it'd be pretty straightforward.
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.
Sadly the speaker port is output-only, and digital at that.
However if you were willing to do a little more poking you could unsolder a few components from the heart rate PCB (easily accessible on top) and then there's an available analog input on that.
It's not something I'd advise doing for anything in production, but for a prototype or something it'd be pretty straightforward.