Short-term sound record, storage and playback

Hello,
I'm dipping my toes back in electronics after almost a decade and bought an Arduino Uno R4 Minima, mainly doing simple stuff.

However, I've started to work on a small project: Among other functions (which are outside the scope of this post), the system must:

  • Record sound (ADC acquisition) when present on pin, for at least 30 seconds.
  • Play the recorded sound (using the DAC) once the source goes quiet or maximum record time is reached.
  • Acquired sound is only played once, it can be discarded. It does not need to be "CD quality".
  • All of the audio I/O, level shifters and other hardware considerations are outside the scope of this post and already taken care of.

I've been mulling solutions on how to acquire and store the sound, and this is what I've thought of:
The Arduino will use an external "big" (8 Mbit) SRAM memory (I've decided against Flash because it will wear out). It will acquire 8-bit samples at 24 ksamples/s (or any other sample rate), store them in the external SRAM then will read back what is stored in the external SRAM. The sound quality should be okay-ish and should cover almost a full minute of recording (which is more than enough).

While I don't see any fatal flaws in this solution, I wonder if I'm missing a more elegant or optimized solution ?
Thanks in advance.

have a look at ISD ChipCorder® ISD4004 Series where audio in recorded onto the chip - search on Amazon etc for boards with microphone input, speaker output etc

also DFPlayer - Mini MP3 Player where audio is on a micro SD card

also Voice Playback Module

also worth looking at Ai-Thinker ESP32 Audio Kit

for recording onto SD card I tend to record using audacity on a PC then write to SD

I don't know if analogRead() can sustain this rate — are you planning to use analogRead() or step outside the Arduino API and configure things directly through the Renesas FSP and use DMA-driven ADC by using double buffering, the ADC autonomously fills buffer A via DMA while the CPU burst-writes buffer B to SRAM over SPI and on transfer completion the roles swap.

Record (through microphone) and playback (through amplifier) with an ESP32 and "I2S" protocol.

https://dronebotworkshop.com/esp32-i2s/