I'm afraid not. You've basically got two methods of using audio:
One-way
Using audio_serial_write() - there's a bit of a delay when sending a command as it's got to wait for the capacitor to charge up, but you don't need any special permissions and it only uses CPU on your PC when sending.
Two-way
This obviously needs access to the mic, and so needs you to click 'ok' when the web browser prompts you - and it uses CPU on your PC all the time, because it's constantly analysing the waveform.
It uses this code - however it depends on stuff in 'EspruinoTools'. It could easily be extracted though, so I'd be interested in a pull request if anyone wanted to pull it out into a self-contained file...
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'm afraid not. You've basically got two methods of using audio:
One-way
Using
audio_serial_write()
- there's a bit of a delay when sending a command as it's got to wait for the capacitor to charge up, but you don't need any special permissions and it only uses CPU on your PC when sending.Two-way
This obviously needs access to the mic, and so needs you to click 'ok' when the web browser prompts you - and it uses CPU on your PC all the time, because it's constantly analysing the waveform.
It uses this code - however it depends on stuff in 'EspruinoTools'. It could easily be extracted though, so I'd be interested in a pull request if anyone wanted to pull it out into a self-contained file...