I was just wondering why you only want to record no more than 240 seconds when using the esp32s3 sense board. Can anyone explain this to me?
The ESP32-S3 typically has 512KB of SRAM (plus ~2MB PSRAM if present). 4MB–16MB of flash memory (varies by board) Audio/video data, especially if uncompressed, consumes memory very quickly.
For example, 16-bit audio at 16kHz mono = ~32KB/sec, 240 seconds = ~7.5MB — that's already near or over the flash limit. Most audio recording examples use in-RAM buffering before flushing to flash or an SD card. Without external storage (like an SD card), long recordings are not feasible.
Use an SD card for longer recordings. Stream to a server via Wi-Fi instead of storing locally.
@aliarifat Oh it took a bit more for me to understand what you were trying to say but I get it now. Ram is used for compression but Ram is also used as a buffer to store before it gets written so it isn't capable of holding onto all of it in the buffer ram before it's written. Is that about on track?
@aliarifat so question could that possibly be offset by a really fast sd card? Even if it isn't indefinite but wouldn't a really fast writing sd card help to offset the buffer ram being used?
A fast SD card can significantly help by allowing the ESP32-S3 to flush the buffer to storage more quickly. It reduces RAM usage, avoids buffer overflows and allows longer (even indefinite) recording sessions in chunks.
Could you recommend a good one? I was looking at a pny but I couldn't find anything specific about it's write speeds it did seem to possibly be faster than others but most of them really only promote the read speed