===== I2S ===== //I2S is the a protocol for streaming and seems like the best way to sample audio input.// * [[https://www.instructables.com/The-Best-Way-for-Sampling-Audio-With-ESP32/|Instructables example code]]: Does this code handle multiple reads? How do we know when a buffer is full and it's time to re-read it? * [[https://dronebotworkshop.com/esp32-i2s/|i2s full tutorial]]:does not address reading multiple times from analog input * [[https://www.youtube.com/watch?v=pPh3_ciEmzs|excellent video walkthru using analog read]] * [[https://github.com/pschatzmann/arduino-audio-tools|Arduino library that seems to do magic]] but documentation for analog read and multiple buffers seems scant * I didn't review [[https://randomnerdtutorials.com/esp32-adc-analog-read-arduino-ide/|this one]] but it might be worth a look * {{ :lwc:hardware:esp32:i2s-bard.ino |Code from Google's AI bard}} that uses interrupts to know when the buffer is full. //This is untested code.// * bard offered these sources: * https://github.com/pion-labs/pion-educational-kits subject to license (MIT) * https://github.com/tanakamasayuki/Arduino_TensorFlowLite_ESP32 subject to license (Apache - 2.0) * https://github.com/eggfly/MusicCard subject to license (Apache - 2.0) * https://forum.arduino.cc/t/esp32-i2s-adc-read-two-inputs-possible/1032963 * https://github.com/espressif/arduino-esp32/issues/4782 ===== I2S alternatives ===== * [[https://www.toptal.com/embedded/esp32-audio-sampling|Audio sampling with interrupts]]