Save audio file?

Hello everyone!
I would like to have an arduino with a microphone and a sd card slot connected to. Then i want to speak into the microphone and save this file on the sd card to replay it later. The mic doesnt run all time. An idea is if i am pressing a button, it should start recording and if i press another button it stops. At the end I want to hear it through a speaker or something like that. I didnt find anything online. Is it even possible?

Hope you can help me,
thanks!

Yes, it is.

The [u]TMRpcm[/u] library can play files as well as record.

I've never used it so I can't help you, but it "pushes the limits" of the (regular) Arduino. The Arduino doesn't have a DAC (no true analog output) so TMRpcm "fakes it" with PWM. It's not great quality and the PWM can sometimes do "bad things" to an amplifier if it's not properly filtered.

You will need an amplifier on the output The Arduino can't directly drive a speaker.

I'm not sure if the recording feature is "ready for prime time", but apparently some people get it to work.

On the input you'll need a preamp for the microphone, or you can get a microphone board with an electret mic and preamp built-in.